Resolved forward reference FONT_HEX_PROTO to FONT_HEX_PROTO Resolved forward reference FONT_HEX_PROTO to FONT_HEX_PROTO Inlined call vicSelectGfxBank::$0 = call toDd00 vicSelectGfxBank::gfx Inlined call main::$1 = call toD018 SCREEN CHARSET Inlined call main::$7 = call toD018 main::BASE_SCREEN main::BASE_CHARSET Inlined call call __init CONTROL FLOW GRAPH SSA void init_font_hex(byte* init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main init_font_hex::charset#6 = phi( main/init_font_hex::charset#1 ) init_font_hex::proto_hi#0 = FONT_HEX_PROTO init_font_hex::c#0 = 0 to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 init_font_hex::c#6 = phi( init_font_hex/init_font_hex::c#0, init_font_hex::@5/init_font_hex::c#1 ) init_font_hex::proto_hi#6 = phi( init_font_hex/init_font_hex::proto_hi#0, init_font_hex::@5/init_font_hex::proto_hi#1 ) init_font_hex::charset#5 = phi( init_font_hex/init_font_hex::charset#6, init_font_hex::@5/init_font_hex::charset#7 ) init_font_hex::proto_lo#0 = FONT_HEX_PROTO init_font_hex::c1#0 = 0 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::c#5 = phi( init_font_hex::@1/init_font_hex::c#6, init_font_hex::@4/init_font_hex::c#3 ) init_font_hex::c1#4 = phi( init_font_hex::@1/init_font_hex::c1#0, init_font_hex::@4/init_font_hex::c1#1 ) init_font_hex::proto_lo#4 = phi( init_font_hex::@1/init_font_hex::proto_lo#0, init_font_hex::@4/init_font_hex::proto_lo#1 ) init_font_hex::proto_hi#4 = phi( init_font_hex::@1/init_font_hex::proto_hi#6, init_font_hex::@4/init_font_hex::proto_hi#5 ) init_font_hex::charset#2 = phi( init_font_hex::@1/init_font_hex::charset#5, init_font_hex::@4/init_font_hex::charset#0 ) init_font_hex::idx#0 = 0 init_font_hex::charset#2[init_font_hex::idx#0] = 0 init_font_hex::idx#1 = ++ init_font_hex::idx#0 init_font_hex::i#0 = 0 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::c#4 = phi( init_font_hex::@2/init_font_hex::c#5, init_font_hex::@3/init_font_hex::c#4 ) init_font_hex::c1#3 = phi( init_font_hex::@2/init_font_hex::c1#4, init_font_hex::@3/init_font_hex::c1#3 ) init_font_hex::idx#5 = phi( init_font_hex::@2/init_font_hex::idx#1, init_font_hex::@3/init_font_hex::idx#2 ) init_font_hex::charset#3 = phi( init_font_hex::@2/init_font_hex::charset#2, init_font_hex::@3/init_font_hex::charset#3 ) init_font_hex::proto_lo#2 = phi( init_font_hex::@2/init_font_hex::proto_lo#4, init_font_hex::@3/init_font_hex::proto_lo#2 ) init_font_hex::i#2 = phi( init_font_hex::@2/init_font_hex::i#0, init_font_hex::@3/init_font_hex::i#1 ) init_font_hex::proto_hi#2 = phi( init_font_hex::@2/init_font_hex::proto_hi#4, init_font_hex::@3/init_font_hex::proto_hi#2 ) init_font_hex::$0 = init_font_hex::proto_hi#2[init_font_hex::i#2] << 4 init_font_hex::$1 = init_font_hex::proto_lo#2[init_font_hex::i#2] << 1 init_font_hex::$2 = init_font_hex::$0 | init_font_hex::$1 init_font_hex::charset#3[init_font_hex::idx#5] = init_font_hex::$2 init_font_hex::idx#2 = ++ init_font_hex::idx#5 init_font_hex::i#1 = init_font_hex::i#2 + rangenext(0,4) init_font_hex::$3 = init_font_hex::i#1 != rangelast(0,4) if(init_font_hex::$3) goto init_font_hex::@3 to:init_font_hex::@4 init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3 init_font_hex::c#3 = phi( init_font_hex::@3/init_font_hex::c#4 ) init_font_hex::proto_hi#5 = phi( init_font_hex::@3/init_font_hex::proto_hi#2 ) init_font_hex::c1#2 = phi( init_font_hex::@3/init_font_hex::c1#3 ) init_font_hex::proto_lo#3 = phi( init_font_hex::@3/init_font_hex::proto_lo#2 ) init_font_hex::idx#6 = phi( init_font_hex::@3/init_font_hex::idx#2 ) init_font_hex::charset#4 = phi( init_font_hex::@3/init_font_hex::charset#3 ) init_font_hex::charset#4[init_font_hex::idx#6] = 0 init_font_hex::idx#3 = ++ init_font_hex::idx#6 init_font_hex::charset#4[init_font_hex::idx#3] = 0 init_font_hex::idx#4 = ++ init_font_hex::idx#3 init_font_hex::proto_lo#1 = init_font_hex::proto_lo#3 + 5 init_font_hex::charset#0 = init_font_hex::charset#4 + 8 init_font_hex::c1#1 = init_font_hex::c1#2 + rangenext(0,$f) init_font_hex::$4 = init_font_hex::c1#1 != rangelast(0,$f) if(init_font_hex::$4) goto init_font_hex::@2 to:init_font_hex::@5 init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 init_font_hex::charset#7 = phi( init_font_hex::@4/init_font_hex::charset#0 ) init_font_hex::c#2 = phi( init_font_hex::@4/init_font_hex::c#3 ) init_font_hex::proto_hi#3 = phi( init_font_hex::@4/init_font_hex::proto_hi#5 ) init_font_hex::proto_hi#1 = init_font_hex::proto_hi#3 + 5 init_font_hex::c#1 = init_font_hex::c#2 + rangenext(0,$f) init_font_hex::$5 = init_font_hex::c#1 != rangelast(0,$f) if(init_font_hex::$5) goto init_font_hex::@1 to:init_font_hex::@return init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 return to:@return word atan2_16(signed word atan2_16::x , signed word atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 atan2_16::x#9 = phi( init_angle_screen::@3/atan2_16::x#0 ) atan2_16::y#1 = phi( init_angle_screen::@3/atan2_16::y#0 ) atan2_16::$0 = atan2_16::y#1 >= 0 if(atan2_16::$0) goto atan2_16::@1 to:atan2_16::@2 atan2_16::@1: scope:[atan2_16] from atan2_16 atan2_16::x#5 = phi( atan2_16/atan2_16::x#9 ) atan2_16::y#2 = phi( atan2_16/atan2_16::y#1 ) atan2_16::$3 = atan2_16::y#2 to:atan2_16::@3 atan2_16::@2: scope:[atan2_16] from atan2_16 atan2_16::x#6 = phi( atan2_16/atan2_16::x#9 ) atan2_16::y#3 = phi( atan2_16/atan2_16::y#1 ) atan2_16::$1 = - atan2_16::y#3 atan2_16::$2 = atan2_16::$1 to:atan2_16::@3 atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 atan2_16::y#15 = phi( atan2_16::@1/atan2_16::y#2, atan2_16::@2/atan2_16::y#3 ) atan2_16::x#1 = phi( atan2_16::@1/atan2_16::x#5, atan2_16::@2/atan2_16::x#6 ) atan2_16::$4 = phi( atan2_16::@1/atan2_16::$3, atan2_16::@2/atan2_16::$2 ) atan2_16::yi#0 = atan2_16::$4 atan2_16::$5 = atan2_16::x#1 >= 0 if(atan2_16::$5) goto atan2_16::@4 to:atan2_16::@5 atan2_16::@4: scope:[atan2_16] from atan2_16::@3 atan2_16::y#12 = phi( atan2_16::@3/atan2_16::y#15 ) atan2_16::yi#12 = phi( atan2_16::@3/atan2_16::yi#0 ) atan2_16::x#2 = phi( atan2_16::@3/atan2_16::x#1 ) atan2_16::$8 = atan2_16::x#2 to:atan2_16::@6 atan2_16::@5: scope:[atan2_16] from atan2_16::@3 atan2_16::y#13 = phi( atan2_16::@3/atan2_16::y#15 ) atan2_16::yi#13 = phi( atan2_16::@3/atan2_16::yi#0 ) atan2_16::x#3 = phi( atan2_16::@3/atan2_16::x#1 ) atan2_16::$6 = - atan2_16::x#3 atan2_16::$7 = atan2_16::$6 to:atan2_16::@6 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 atan2_16::y#9 = phi( atan2_16::@4/atan2_16::y#12, atan2_16::@5/atan2_16::y#13 ) atan2_16::x#10 = phi( atan2_16::@4/atan2_16::x#2, atan2_16::@5/atan2_16::x#3 ) atan2_16::yi#9 = phi( atan2_16::@4/atan2_16::yi#12, atan2_16::@5/atan2_16::yi#13 ) atan2_16::$9 = phi( atan2_16::@4/atan2_16::$8, atan2_16::@5/atan2_16::$7 ) atan2_16::xi#0 = atan2_16::$9 atan2_16::angle#0 = 0 atan2_16::i#0 = 0 to:atan2_16::@10 atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 atan2_16::y#7 = phi( atan2_16::@19/atan2_16::y#8, atan2_16::@6/atan2_16::y#9 ) atan2_16::x#7 = phi( atan2_16::@19/atan2_16::x#8, atan2_16::@6/atan2_16::x#10 ) atan2_16::angle#12 = phi( atan2_16::@19/atan2_16::angle#13, atan2_16::@6/atan2_16::angle#0 ) atan2_16::i#6 = phi( atan2_16::@19/atan2_16::i#1, atan2_16::@6/atan2_16::i#0 ) atan2_16::xi#6 = phi( atan2_16::@19/atan2_16::xi#8, atan2_16::@6/atan2_16::xi#0 ) atan2_16::yi#3 = phi( atan2_16::@19/atan2_16::yi#8, atan2_16::@6/atan2_16::yi#9 ) atan2_16::$16 = atan2_16::yi#3 == 0 atan2_16::$17 = ! atan2_16::$16 if(atan2_16::$17) goto atan2_16::@11 to:atan2_16::@12 atan2_16::@11: scope:[atan2_16] from atan2_16::@10 atan2_16::y#19 = phi( atan2_16::@10/atan2_16::y#7 ) atan2_16::x#17 = phi( atan2_16::@10/atan2_16::x#7 ) atan2_16::angle#19 = phi( atan2_16::@10/atan2_16::angle#12 ) atan2_16::i#2 = phi( atan2_16::@10/atan2_16::i#6 ) atan2_16::yi#4 = phi( atan2_16::@10/atan2_16::yi#3 ) atan2_16::xi#3 = phi( atan2_16::@10/atan2_16::xi#6 ) atan2_16::xd#0 = atan2_16::xi#3 atan2_16::yd#0 = atan2_16::yi#4 atan2_16::shift#0 = atan2_16::i#2 to:atan2_16::@13 atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 atan2_16::y#5 = phi( atan2_16::@10/atan2_16::y#7, atan2_16::@19/atan2_16::y#8 ) atan2_16::x#4 = phi( atan2_16::@10/atan2_16::x#7, atan2_16::@19/atan2_16::x#8 ) atan2_16::angle#6 = phi( atan2_16::@10/atan2_16::angle#12, atan2_16::@19/atan2_16::angle#13 ) atan2_16::angle#1 = atan2_16::angle#6 / 2 atan2_16::$10 = atan2_16::x#4 < 0 atan2_16::$11 = ! atan2_16::$10 if(atan2_16::$11) goto atan2_16::@7 to:atan2_16::@21 atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 atan2_16::y#18 = phi( atan2_16::@11/atan2_16::y#19, atan2_16::@14/atan2_16::y#20 ) atan2_16::x#16 = phi( atan2_16::@11/atan2_16::x#17, atan2_16::@14/atan2_16::x#18 ) atan2_16::angle#18 = phi( atan2_16::@11/atan2_16::angle#19, atan2_16::@14/atan2_16::angle#20 ) atan2_16::i#10 = phi( atan2_16::@11/atan2_16::i#2, atan2_16::@14/atan2_16::i#11 ) atan2_16::xi#11 = phi( atan2_16::@11/atan2_16::xi#3, atan2_16::@14/atan2_16::xi#12 ) atan2_16::yi#14 = phi( atan2_16::@11/atan2_16::yi#4, atan2_16::@14/atan2_16::yi#15 ) atan2_16::yd#7 = phi( atan2_16::@11/atan2_16::yd#0, atan2_16::@14/atan2_16::yd#1 ) atan2_16::xd#7 = phi( atan2_16::@11/atan2_16::xd#0, atan2_16::@14/atan2_16::xd#1 ) atan2_16::shift#2 = phi( atan2_16::@11/atan2_16::shift#0, atan2_16::@14/atan2_16::shift#1 ) atan2_16::$18 = atan2_16::shift#2 >= 2 if(atan2_16::$18) goto atan2_16::@14 to:atan2_16::@15 atan2_16::@14: scope:[atan2_16] from atan2_16::@13 atan2_16::y#20 = phi( atan2_16::@13/atan2_16::y#18 ) atan2_16::x#18 = phi( atan2_16::@13/atan2_16::x#16 ) atan2_16::angle#20 = phi( atan2_16::@13/atan2_16::angle#18 ) atan2_16::i#11 = phi( atan2_16::@13/atan2_16::i#10 ) atan2_16::xi#12 = phi( atan2_16::@13/atan2_16::xi#11 ) atan2_16::yi#15 = phi( atan2_16::@13/atan2_16::yi#14 ) atan2_16::shift#3 = phi( atan2_16::@13/atan2_16::shift#2 ) atan2_16::yd#3 = phi( atan2_16::@13/atan2_16::yd#7 ) atan2_16::xd#3 = phi( atan2_16::@13/atan2_16::xd#7 ) atan2_16::xd#1 = atan2_16::xd#3 >> 2 atan2_16::yd#1 = atan2_16::yd#3 >> 2 atan2_16::shift#1 = atan2_16::shift#3 - 2 to:atan2_16::@13 atan2_16::@15: scope:[atan2_16] from atan2_16::@13 atan2_16::y#16 = phi( atan2_16::@13/atan2_16::y#18 ) atan2_16::x#14 = phi( atan2_16::@13/atan2_16::x#16 ) atan2_16::angle#16 = phi( atan2_16::@13/atan2_16::angle#18 ) atan2_16::i#8 = phi( atan2_16::@13/atan2_16::i#10 ) atan2_16::xi#9 = phi( atan2_16::@13/atan2_16::xi#11 ) atan2_16::yd#8 = phi( atan2_16::@13/atan2_16::yd#7 ) atan2_16::xd#8 = phi( atan2_16::@13/atan2_16::xd#7 ) atan2_16::yi#10 = phi( atan2_16::@13/atan2_16::yi#14 ) atan2_16::shift#4 = phi( atan2_16::@13/atan2_16::shift#2 ) atan2_16::$24 = 0 != atan2_16::shift#4 atan2_16::$19 = ! atan2_16::$24 if(atan2_16::$19) goto atan2_16::@17 to:atan2_16::@16 atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 atan2_16::y#14 = phi( atan2_16::@15/atan2_16::y#16, atan2_16::@16/atan2_16::y#17 ) atan2_16::x#13 = phi( atan2_16::@15/atan2_16::x#14, atan2_16::@16/atan2_16::x#15 ) atan2_16::angle#14 = phi( atan2_16::@15/atan2_16::angle#16, atan2_16::@16/atan2_16::angle#17 ) atan2_16::i#7 = phi( atan2_16::@15/atan2_16::i#8, atan2_16::@16/atan2_16::i#9 ) atan2_16::xd#9 = phi( atan2_16::@15/atan2_16::xd#8, atan2_16::@16/atan2_16::xd#2 ) atan2_16::yd#9 = phi( atan2_16::@15/atan2_16::yd#8, atan2_16::@16/atan2_16::yd#2 ) atan2_16::xi#7 = phi( atan2_16::@15/atan2_16::xi#9, atan2_16::@16/atan2_16::xi#10 ) atan2_16::yi#5 = phi( atan2_16::@15/atan2_16::yi#10, atan2_16::@16/atan2_16::yi#11 ) atan2_16::$20 = atan2_16::yi#5 >= 0 if(atan2_16::$20) goto atan2_16::@18 to:atan2_16::@20 atan2_16::@16: scope:[atan2_16] from atan2_16::@15 atan2_16::y#17 = phi( atan2_16::@15/atan2_16::y#16 ) atan2_16::x#15 = phi( atan2_16::@15/atan2_16::x#14 ) atan2_16::angle#17 = phi( atan2_16::@15/atan2_16::angle#16 ) atan2_16::i#9 = phi( atan2_16::@15/atan2_16::i#8 ) atan2_16::xi#10 = phi( atan2_16::@15/atan2_16::xi#9 ) atan2_16::yi#11 = phi( atan2_16::@15/atan2_16::yi#10 ) atan2_16::yd#4 = phi( atan2_16::@15/atan2_16::yd#8 ) atan2_16::xd#4 = phi( atan2_16::@15/atan2_16::xd#8 ) atan2_16::xd#2 = atan2_16::xd#4 >> 1 atan2_16::yd#2 = atan2_16::yd#4 >> 1 to:atan2_16::@17 atan2_16::@18: scope:[atan2_16] from atan2_16::@17 atan2_16::y#10 = phi( atan2_16::@17/atan2_16::y#14 ) atan2_16::x#11 = phi( atan2_16::@17/atan2_16::x#13 ) atan2_16::angle#7 = phi( atan2_16::@17/atan2_16::angle#14 ) atan2_16::i#3 = phi( atan2_16::@17/atan2_16::i#7 ) atan2_16::xd#5 = phi( atan2_16::@17/atan2_16::xd#9 ) atan2_16::yi#6 = phi( atan2_16::@17/atan2_16::yi#5 ) atan2_16::yd#5 = phi( atan2_16::@17/atan2_16::yd#9 ) atan2_16::xi#4 = phi( atan2_16::@17/atan2_16::xi#7 ) atan2_16::xi#1 = atan2_16::xi#4 + atan2_16::yd#5 atan2_16::yi#1 = atan2_16::yi#6 - atan2_16::xd#5 atan2_16::$22 = atan2_16::i#3 * SIZEOF_WORD atan2_16::angle#2 = atan2_16::angle#7 + CORDIC_ATAN2_ANGLES_16[atan2_16::$22] to:atan2_16::@19 atan2_16::@20: scope:[atan2_16] from atan2_16::@17 atan2_16::y#11 = phi( atan2_16::@17/atan2_16::y#14 ) atan2_16::x#12 = phi( atan2_16::@17/atan2_16::x#13 ) atan2_16::angle#8 = phi( atan2_16::@17/atan2_16::angle#14 ) atan2_16::i#4 = phi( atan2_16::@17/atan2_16::i#7 ) atan2_16::xd#6 = phi( atan2_16::@17/atan2_16::xd#9 ) atan2_16::yi#7 = phi( atan2_16::@17/atan2_16::yi#5 ) atan2_16::yd#6 = phi( atan2_16::@17/atan2_16::yd#9 ) atan2_16::xi#5 = phi( atan2_16::@17/atan2_16::xi#7 ) atan2_16::xi#2 = atan2_16::xi#5 - atan2_16::yd#6 atan2_16::yi#2 = atan2_16::yi#7 + atan2_16::xd#6 atan2_16::$23 = atan2_16::i#4 * SIZEOF_WORD atan2_16::angle#3 = atan2_16::angle#8 - CORDIC_ATAN2_ANGLES_16[atan2_16::$23] to:atan2_16::@19 atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 atan2_16::y#8 = phi( atan2_16::@18/atan2_16::y#10, atan2_16::@20/atan2_16::y#11 ) atan2_16::xi#8 = phi( atan2_16::@18/atan2_16::xi#1, atan2_16::@20/atan2_16::xi#2 ) atan2_16::x#8 = phi( atan2_16::@18/atan2_16::x#11, atan2_16::@20/atan2_16::x#12 ) atan2_16::angle#13 = phi( atan2_16::@18/atan2_16::angle#2, atan2_16::@20/atan2_16::angle#3 ) atan2_16::yi#8 = phi( atan2_16::@18/atan2_16::yi#1, atan2_16::@20/atan2_16::yi#2 ) atan2_16::i#5 = phi( atan2_16::@18/atan2_16::i#3, atan2_16::@20/atan2_16::i#4 ) atan2_16::i#1 = atan2_16::i#5 + rangenext(0,CORDIC_ITERATIONS_16-1) atan2_16::$21 = atan2_16::i#1 != rangelast(0,CORDIC_ITERATIONS_16-1) if(atan2_16::$21) goto atan2_16::@10 to:atan2_16::@12 atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 atan2_16::angle#15 = phi( atan2_16::@12/atan2_16::angle#1, atan2_16::@21/atan2_16::angle#4 ) atan2_16::y#4 = phi( atan2_16::@12/atan2_16::y#5, atan2_16::@21/atan2_16::y#6 ) atan2_16::$13 = atan2_16::y#4 < 0 atan2_16::$14 = ! atan2_16::$13 if(atan2_16::$14) goto atan2_16::@8 to:atan2_16::@9 atan2_16::@21: scope:[atan2_16] from atan2_16::@12 atan2_16::y#6 = phi( atan2_16::@12/atan2_16::y#5 ) atan2_16::angle#9 = phi( atan2_16::@12/atan2_16::angle#1 ) atan2_16::$12 = $8000 - atan2_16::angle#9 atan2_16::angle#4 = atan2_16::$12 to:atan2_16::@7 atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9 atan2_16::angle#10 = phi( atan2_16::@7/atan2_16::angle#15, atan2_16::@9/atan2_16::angle#5 ) atan2_16::return#0 = atan2_16::angle#10 to:atan2_16::@return atan2_16::@9: scope:[atan2_16] from atan2_16::@7 atan2_16::angle#11 = phi( atan2_16::@7/atan2_16::angle#15 ) atan2_16::$15 = - atan2_16::angle#11 atan2_16::angle#5 = atan2_16::$15 to:atan2_16::@8 atan2_16::@return: scope:[atan2_16] from atan2_16::@8 atan2_16::return#3 = phi( atan2_16::@8/atan2_16::return#0 ) atan2_16::return#1 = atan2_16::return#3 return to:@return dword clock() clock: scope:[clock] from main::@5 clock::$0 = $ffffffff - *CIA2_TIMER_AB clock::return#0 = clock::$0 to:clock::@return clock::@return: scope:[clock] from clock clock::return#3 = phi( clock/clock::return#0 ) clock::return#1 = clock::return#3 return to:@return void clock_start() clock_start: scope:[clock_start] from main::@1 *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = CIA_TIMER_CONTROL_STOP|CIA_TIMER_CONTROL_CONTINUOUS|CIA_TIMER_CONTROL_A_COUNT_CYCLES *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = CIA_TIMER_CONTROL_STOP|CIA_TIMER_CONTROL_CONTINUOUS|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A *CIA2_TIMER_AB = $ffffffff *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS|CIA_TIMER_CONTROL_A_COUNT_CYCLES to:clock_start::@return clock_start::@return: scope:[clock_start] from clock_start return to:@return void print_uint_at(word print_uint_at::w , byte* print_uint_at::at) print_uint_at: scope:[print_uint_at] from print_ulong_at print_ulong_at::@1 print_uint_at::at#2 = phi( print_ulong_at/print_uint_at::at#0, print_ulong_at::@1/print_uint_at::at#1 ) print_uint_at::w#2 = phi( print_ulong_at/print_uint_at::w#0, print_ulong_at::@1/print_uint_at::w#1 ) print_uint_at::$0 = > print_uint_at::w#2 print_uchar_at::b#0 = print_uint_at::$0 print_uchar_at::at#0 = print_uint_at::at#2 call print_uchar_at to:print_uint_at::@1 print_uint_at::@1: scope:[print_uint_at] from print_uint_at print_uint_at::at#3 = phi( print_uint_at/print_uint_at::at#2 ) print_uint_at::w#3 = phi( print_uint_at/print_uint_at::w#2 ) print_uint_at::$2 = < print_uint_at::w#3 print_uint_at::$3 = print_uint_at::at#3 + 2 print_uchar_at::b#1 = print_uint_at::$2 print_uchar_at::at#1 = print_uint_at::$3 call print_uchar_at to:print_uint_at::@2 print_uint_at::@2: scope:[print_uint_at] from print_uint_at::@1 to:print_uint_at::@return print_uint_at::@return: scope:[print_uint_at] from print_uint_at::@2 return to:@return void print_ulong_at(dword print_ulong_at::dw , byte* print_ulong_at::at) print_ulong_at: scope:[print_ulong_at] from main::@6 print_ulong_at::at#1 = phi( main::@6/print_ulong_at::at#0 ) print_ulong_at::dw#1 = phi( main::@6/print_ulong_at::dw#0 ) print_ulong_at::$0 = > print_ulong_at::dw#1 print_uint_at::w#0 = print_ulong_at::$0 print_uint_at::at#0 = print_ulong_at::at#1 call print_uint_at to:print_ulong_at::@1 print_ulong_at::@1: scope:[print_ulong_at] from print_ulong_at print_ulong_at::at#2 = phi( print_ulong_at/print_ulong_at::at#1 ) print_ulong_at::dw#2 = phi( print_ulong_at/print_ulong_at::dw#1 ) print_ulong_at::$2 = < print_ulong_at::dw#2 print_ulong_at::$3 = print_ulong_at::at#2 + 4 print_uint_at::w#1 = print_ulong_at::$2 print_uint_at::at#1 = print_ulong_at::$3 call print_uint_at to:print_ulong_at::@2 print_ulong_at::@2: scope:[print_ulong_at] from print_ulong_at::@1 to:print_ulong_at::@return print_ulong_at::@return: scope:[print_ulong_at] from print_ulong_at::@2 return to:@return void print_uchar_at(byte print_uchar_at::b , byte* print_uchar_at::at) print_uchar_at: scope:[print_uchar_at] from print_uint_at print_uint_at::@1 print_uchar_at::at#2 = phi( print_uint_at/print_uchar_at::at#0, print_uint_at::@1/print_uchar_at::at#1 ) print_uchar_at::b#2 = phi( print_uint_at/print_uchar_at::b#0, print_uint_at::@1/print_uchar_at::b#1 ) print_uchar_at::$0 = print_uchar_at::b#2 >> 4 print_char_at::ch#0 = print_hextab[print_uchar_at::$0] print_char_at::at#0 = print_uchar_at::at#2 call print_char_at to:print_uchar_at::@1 print_uchar_at::@1: scope:[print_uchar_at] from print_uchar_at print_uchar_at::at#3 = phi( print_uchar_at/print_uchar_at::at#2 ) print_uchar_at::b#3 = phi( print_uchar_at/print_uchar_at::b#2 ) print_uchar_at::$2 = print_uchar_at::b#3 & $f print_uchar_at::$3 = print_uchar_at::at#3 + 1 print_char_at::ch#1 = print_hextab[print_uchar_at::$2] print_char_at::at#1 = print_uchar_at::$3 call print_char_at to:print_uchar_at::@2 print_uchar_at::@2: scope:[print_uchar_at] from print_uchar_at::@1 to:print_uchar_at::@return print_uchar_at::@return: scope:[print_uchar_at] from print_uchar_at::@2 return to:@return void print_char_at(byte print_char_at::ch , byte* print_char_at::at) print_char_at: scope:[print_char_at] from print_uchar_at print_uchar_at::@1 print_char_at::at#2 = phi( print_uchar_at/print_char_at::at#0, print_uchar_at::@1/print_char_at::at#1 ) print_char_at::ch#2 = phi( print_uchar_at/print_char_at::ch#0, print_uchar_at::@1/print_char_at::ch#1 ) *print_char_at::at#2 = print_char_at::ch#2 to:print_char_at::@return print_char_at::@return: scope:[print_char_at] from print_char_at return to:@return void main() main: scope:[main] from __start::@1 init_font_hex::charset#1 = CHARSET call init_font_hex to:main::@3 main::@3: scope:[main] from main main::toD0181_screen#0 = SCREEN main::toD0181_gfx#0 = CHARSET to:main::toD0181 main::toD0181: scope:[main] from main::@3 main::toD0181_gfx#1 = phi( main::@3/main::toD0181_gfx#0 ) main::toD0181_screen#1 = phi( main::@3/main::toD0181_screen#0 ) main::toD0181_$7 = (word)main::toD0181_screen#1 main::toD0181_$0 = main::toD0181_$7 & $3fff main::toD0181_$1 = main::toD0181_$0 * 4 main::toD0181_$2 = > main::toD0181_$1 main::toD0181_$3 = > (word)main::toD0181_gfx#1 main::toD0181_$4 = main::toD0181_$3 / 4 main::toD0181_$5 = main::toD0181_$4 & $f main::toD0181_$6 = main::toD0181_$2 | main::toD0181_$5 main::toD0181_return#0 = main::toD0181_$6 to:main::toD0181_@return main::toD0181_@return: scope:[main] from main::toD0181 main::toD0181_return#2 = phi( main::toD0181/main::toD0181_return#0 ) main::toD0181_return#1 = main::toD0181_return#2 to:main::@1 main::@1: scope:[main] from main::toD0181_@return main::toD0181_return#3 = phi( main::toD0181_@return/main::toD0181_return#1 ) main::$1 = main::toD0181_return#3 *D018 = main::$1 call clock_start to:main::@4 main::@4: scope:[main] from main::@1 init_angle_screen::screen#0 = SCREEN call init_angle_screen to:main::@5 main::@5: scope:[main] from main::@4 call clock clock::return#2 = clock::return#1 to:main::@6 main::@6: scope:[main] from main::@5 clock::return#4 = phi( main::@5/clock::return#2 ) main::$4 = clock::return#4 main::$5 = main::$4 - CLOCKS_PER_INIT main::cyclecount#0 = main::$5 print_ulong_at::dw#0 = main::cyclecount#0 print_ulong_at::at#0 = main::BASE_SCREEN call print_ulong_at to:main::@7 main::@7: scope:[main] from main::@6 main::toD0182_screen#0 = main::BASE_SCREEN main::toD0182_gfx#0 = main::BASE_CHARSET to:main::toD0182 main::toD0182: scope:[main] from main::@7 main::toD0182_gfx#1 = phi( main::@7/main::toD0182_gfx#0 ) main::toD0182_screen#1 = phi( main::@7/main::toD0182_screen#0 ) main::toD0182_$7 = (word)main::toD0182_screen#1 main::toD0182_$0 = main::toD0182_$7 & $3fff main::toD0182_$1 = main::toD0182_$0 * 4 main::toD0182_$2 = > main::toD0182_$1 main::toD0182_$3 = > (word)main::toD0182_gfx#1 main::toD0182_$4 = main::toD0182_$3 / 4 main::toD0182_$5 = main::toD0182_$4 & $f main::toD0182_$6 = main::toD0182_$2 | main::toD0182_$5 main::toD0182_return#0 = main::toD0182_$6 to:main::toD0182_@return main::toD0182_@return: scope:[main] from main::toD0182 main::toD0182_return#2 = phi( main::toD0182/main::toD0182_return#0 ) main::toD0182_return#1 = main::toD0182_return#2 to:main::@2 main::@2: scope:[main] from main::toD0182_@return main::toD0182_return#3 = phi( main::toD0182_@return/main::toD0182_return#1 ) main::$7 = main::toD0182_return#3 *D018 = main::$7 to:main::@return main::@return: scope:[main] from main::@2 return to:@return void init_angle_screen(byte* init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@4 init_angle_screen::screen#1 = phi( main::@4/init_angle_screen::screen#0 ) init_angle_screen::$0 = init_angle_screen::screen#1 + $28*$c init_angle_screen::screen_topline#0 = init_angle_screen::$0 init_angle_screen::$1 = init_angle_screen::screen#1 + $28*$c init_angle_screen::screen_bottomline#0 = init_angle_screen::$1 init_angle_screen::y#0 = 0 to:init_angle_screen::@1 init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@4 init_angle_screen::screen_bottomline#6 = phi( init_angle_screen/init_angle_screen::screen_bottomline#0, init_angle_screen::@4/init_angle_screen::screen_bottomline#1 ) init_angle_screen::screen_topline#6 = phi( init_angle_screen/init_angle_screen::screen_topline#0, init_angle_screen::@4/init_angle_screen::screen_topline#1 ) init_angle_screen::y#5 = phi( init_angle_screen/init_angle_screen::y#0, init_angle_screen::@4/init_angle_screen::y#1 ) init_angle_screen::x#0 = 0 init_angle_screen::xb#0 = $27 to:init_angle_screen::@2 init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5 init_angle_screen::xb#4 = phi( init_angle_screen::@1/init_angle_screen::xb#0, init_angle_screen::@5/init_angle_screen::xb#1 ) init_angle_screen::screen_bottomline#5 = phi( init_angle_screen::@1/init_angle_screen::screen_bottomline#6, init_angle_screen::@5/init_angle_screen::screen_bottomline#2 ) init_angle_screen::screen_topline#5 = phi( init_angle_screen::@1/init_angle_screen::screen_topline#6, init_angle_screen::@5/init_angle_screen::screen_topline#2 ) init_angle_screen::y#4 = phi( init_angle_screen::@1/init_angle_screen::y#5, init_angle_screen::@5/init_angle_screen::y#6 ) init_angle_screen::x#2 = phi( init_angle_screen::@1/init_angle_screen::x#0, init_angle_screen::@5/init_angle_screen::x#1 ) init_angle_screen::$2 = init_angle_screen::x#2 <= $13 if(init_angle_screen::$2) goto init_angle_screen::@3 to:init_angle_screen::@4 init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@2 init_angle_screen::screen_topline#4 = phi( init_angle_screen::@2/init_angle_screen::screen_topline#5 ) init_angle_screen::xb#3 = phi( init_angle_screen::@2/init_angle_screen::xb#4 ) init_angle_screen::screen_bottomline#4 = phi( init_angle_screen::@2/init_angle_screen::screen_bottomline#5 ) init_angle_screen::y#2 = phi( init_angle_screen::@2/init_angle_screen::y#4 ) init_angle_screen::x#3 = phi( init_angle_screen::@2/init_angle_screen::x#2 ) init_angle_screen::$3 = init_angle_screen::x#3 * 2 init_angle_screen::$4 = $27 - init_angle_screen::$3 init_angle_screen::xw#0 = (signed word)(word){ init_angle_screen::$4, 0 } init_angle_screen::$5 = init_angle_screen::y#2 * 2 init_angle_screen::yw#0 = (signed word)(word){ init_angle_screen::$5, 0 } atan2_16::x#0 = init_angle_screen::xw#0 atan2_16::y#0 = init_angle_screen::yw#0 call atan2_16 atan2_16::return#2 = atan2_16::return#1 to:init_angle_screen::@5 init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 init_angle_screen::y#6 = phi( init_angle_screen::@3/init_angle_screen::y#2 ) init_angle_screen::x#4 = phi( init_angle_screen::@3/init_angle_screen::x#3 ) init_angle_screen::screen_topline#2 = phi( init_angle_screen::@3/init_angle_screen::screen_topline#4 ) init_angle_screen::xb#2 = phi( init_angle_screen::@3/init_angle_screen::xb#3 ) init_angle_screen::screen_bottomline#2 = phi( init_angle_screen::@3/init_angle_screen::screen_bottomline#4 ) atan2_16::return#4 = phi( init_angle_screen::@3/atan2_16::return#2 ) init_angle_screen::$6 = atan2_16::return#4 init_angle_screen::angle_w#0 = init_angle_screen::$6 init_angle_screen::$7 = init_angle_screen::angle_w#0 + $80 init_angle_screen::$8 = > init_angle_screen::$7 init_angle_screen::ang_w#0 = init_angle_screen::$8 init_angle_screen::screen_bottomline#2[init_angle_screen::xb#2] = init_angle_screen::ang_w#0 init_angle_screen::$9 = - init_angle_screen::ang_w#0 init_angle_screen::screen_topline#2[init_angle_screen::xb#2] = init_angle_screen::$9 init_angle_screen::$10 = $80 + init_angle_screen::ang_w#0 init_angle_screen::screen_topline#2[init_angle_screen::x#4] = init_angle_screen::$10 init_angle_screen::$11 = $80 - init_angle_screen::ang_w#0 init_angle_screen::screen_bottomline#2[init_angle_screen::x#4] = init_angle_screen::$11 init_angle_screen::x#1 = ++ init_angle_screen::x#4 init_angle_screen::xb#1 = -- init_angle_screen::xb#2 to:init_angle_screen::@2 init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 init_angle_screen::y#3 = phi( init_angle_screen::@2/init_angle_screen::y#4 ) init_angle_screen::screen_bottomline#3 = phi( init_angle_screen::@2/init_angle_screen::screen_bottomline#5 ) init_angle_screen::screen_topline#3 = phi( init_angle_screen::@2/init_angle_screen::screen_topline#5 ) init_angle_screen::screen_topline#1 = init_angle_screen::screen_topline#3 - $28 init_angle_screen::screen_bottomline#1 = init_angle_screen::screen_bottomline#3 + $28 init_angle_screen::y#1 = init_angle_screen::y#3 + rangenext(0,$c) init_angle_screen::$12 = init_angle_screen::y#1 != rangelast(0,$c) if(init_angle_screen::$12) goto init_angle_screen::@1 to:init_angle_screen::@return init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@4 return to:@return void __start() __start: scope:[__start] from to:__start::__init1 __start::__init1: scope:[__start] from __start to:__start::@1 __start::@1: scope:[__start] from __start::__init1 call main to:__start::@2 __start::@2: scope:[__start] from __start::@1 to:__start::@return __start::@return: scope:[__start] from __start::@2 return to:@return SYMBOL TABLE SSA const nomodify byte* CHARSET = (byte*)$2000 const nomodify struct MOS6526_CIA* CIA2 = (struct MOS6526_CIA*)$dd00 const nomodify dword* CIA2_TIMER_AB = (dword*)$dd04 const nomodify byte CIA_TIMER_CONTROL_A_COUNT_CYCLES = 0 const nomodify byte CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A = $40 const nomodify byte CIA_TIMER_CONTROL_CONTINUOUS = 0 const nomodify byte CIA_TIMER_CONTROL_START = 1 const nomodify byte CIA_TIMER_CONTROL_STOP = 0 const nomodify dword CLOCKS_PER_INIT = $12 const word* CORDIC_ATAN2_ANGLES_16[CORDIC_ITERATIONS_16] = kickasm {{ .for (var i=0; i= 0 Adding number conversion cast (snumber) 0 in atan2_16::$5 = atan2_16::x#1 >= 0 Adding number conversion cast (snumber) 0 in atan2_16::$16 = atan2_16::yi#3 == 0 Adding number conversion cast (unumber) 2 in atan2_16::angle#1 = atan2_16::angle#6 / 2 Adding number conversion cast (snumber) 0 in atan2_16::$10 = atan2_16::x#4 < 0 Adding number conversion cast (unumber) 2 in atan2_16::$18 = atan2_16::shift#2 >= 2 Adding number conversion cast (snumber) 2 in atan2_16::xd#1 = atan2_16::xd#3 >> 2 Adding number conversion cast (snumber) 2 in atan2_16::yd#1 = atan2_16::yd#3 >> 2 Adding number conversion cast (unumber) 2 in atan2_16::shift#1 = atan2_16::shift#3 - 2 Adding number conversion cast (unumber) 0 in atan2_16::$24 = 0 != atan2_16::shift#4 Adding number conversion cast (snumber) 0 in atan2_16::$20 = atan2_16::yi#5 >= 0 Adding number conversion cast (snumber) 1 in atan2_16::xd#2 = atan2_16::xd#4 >> 1 Adding number conversion cast (snumber) 1 in atan2_16::yd#2 = atan2_16::yd#4 >> 1 Adding number conversion cast (unumber) 1 in atan2_16::i#1 = atan2_16::i#5 + rangenext(0,CORDIC_ITERATIONS_16-1) Adding number conversion cast (snumber) 0 in atan2_16::$13 = atan2_16::y#4 < 0 Adding number conversion cast (unumber) $8000 in atan2_16::$12 = $8000 - atan2_16::angle#9 Adding number conversion cast (unumber) atan2_16::$12 in atan2_16::$12 = (unumber)$8000 - atan2_16::angle#9 Adding number conversion cast (unumber) $ffffffff in clock::$0 = $ffffffff - *CIA2_TIMER_AB Adding number conversion cast (unumber) clock::$0 in clock::$0 = (unumber)$ffffffff - *CIA2_TIMER_AB Adding number conversion cast (unumber) $ffffffff in *CIA2_TIMER_AB = $ffffffff Adding number conversion cast (unumber) 2 in print_uint_at::$3 = print_uint_at::at#3 + 2 Adding number conversion cast (unumber) 4 in print_ulong_at::$3 = print_ulong_at::at#2 + 4 Adding number conversion cast (unumber) 4 in print_uchar_at::$0 = print_uchar_at::b#2 >> 4 Adding number conversion cast (unumber) $f in print_uchar_at::$2 = print_uchar_at::b#3 & $f Adding number conversion cast (unumber) print_uchar_at::$2 in print_uchar_at::$2 = print_uchar_at::b#3 & (unumber)$f Adding number conversion cast (unumber) 1 in print_uchar_at::$3 = print_uchar_at::at#3 + 1 Adding number conversion cast (unumber) $3fff in main::toD0181_$0 = main::toD0181_$7 & $3fff Adding number conversion cast (unumber) main::toD0181_$0 in main::toD0181_$0 = main::toD0181_$7 & (unumber)$3fff Adding number conversion cast (unumber) 4 in main::toD0181_$1 = main::toD0181_$0 * 4 Adding number conversion cast (unumber) main::toD0181_$1 in main::toD0181_$1 = main::toD0181_$0 * (unumber)4 Adding number conversion cast (unumber) main::toD0181_$2 in main::toD0181_$2 = > main::toD0181_$1 Adding number conversion cast (unumber) 4 in main::toD0181_$4 = main::toD0181_$3 / 4 Adding number conversion cast (unumber) main::toD0181_$4 in main::toD0181_$4 = main::toD0181_$3 / (unumber)4 Adding number conversion cast (unumber) $f in main::toD0181_$5 = main::toD0181_$4 & $f Adding number conversion cast (unumber) main::toD0181_$5 in main::toD0181_$5 = main::toD0181_$4 & (unumber)$f Adding number conversion cast (unumber) main::toD0181_$6 in main::toD0181_$6 = main::toD0181_$2 | main::toD0181_$5 Adding number conversion cast (unumber) $3fff in main::toD0182_$0 = main::toD0182_$7 & $3fff Adding number conversion cast (unumber) main::toD0182_$0 in main::toD0182_$0 = main::toD0182_$7 & (unumber)$3fff Adding number conversion cast (unumber) 4 in main::toD0182_$1 = main::toD0182_$0 * 4 Adding number conversion cast (unumber) main::toD0182_$1 in main::toD0182_$1 = main::toD0182_$0 * (unumber)4 Adding number conversion cast (unumber) main::toD0182_$2 in main::toD0182_$2 = > main::toD0182_$1 Adding number conversion cast (unumber) 4 in main::toD0182_$4 = main::toD0182_$3 / 4 Adding number conversion cast (unumber) main::toD0182_$4 in main::toD0182_$4 = main::toD0182_$3 / (unumber)4 Adding number conversion cast (unumber) $f in main::toD0182_$5 = main::toD0182_$4 & $f Adding number conversion cast (unumber) main::toD0182_$5 in main::toD0182_$5 = main::toD0182_$4 & (unumber)$f Adding number conversion cast (unumber) main::toD0182_$6 in main::toD0182_$6 = main::toD0182_$2 | main::toD0182_$5 Adding number conversion cast (unumber) $28*$c in init_angle_screen::$0 = init_angle_screen::screen#1 + $28*$c Adding number conversion cast (unumber) $28*$c in init_angle_screen::$1 = init_angle_screen::screen#1 + $28*$c Adding number conversion cast (unumber) $13 in init_angle_screen::$2 = init_angle_screen::x#2 <= $13 Adding number conversion cast (unumber) 2 in init_angle_screen::$3 = init_angle_screen::x#3 * 2 Adding number conversion cast (unumber) init_angle_screen::$3 in init_angle_screen::$3 = init_angle_screen::x#3 * (unumber)2 Adding number conversion cast (unumber) $27 in init_angle_screen::$4 = $27 - init_angle_screen::$3 Adding number conversion cast (unumber) init_angle_screen::$4 in init_angle_screen::$4 = (unumber)$27 - init_angle_screen::$3 Adding number conversion cast (unumber) 2 in init_angle_screen::$5 = init_angle_screen::y#2 * 2 Adding number conversion cast (unumber) init_angle_screen::$5 in init_angle_screen::$5 = init_angle_screen::y#2 * (unumber)2 Adding number conversion cast (unumber) $80 in init_angle_screen::$7 = init_angle_screen::angle_w#0 + $80 Adding number conversion cast (unumber) init_angle_screen::$7 in init_angle_screen::$7 = init_angle_screen::angle_w#0 + (unumber)$80 Adding number conversion cast (unumber) init_angle_screen::$8 in init_angle_screen::$8 = > init_angle_screen::$7 Adding number conversion cast (unumber) $80 in init_angle_screen::$10 = $80 + init_angle_screen::ang_w#0 Adding number conversion cast (unumber) init_angle_screen::$10 in init_angle_screen::$10 = (unumber)$80 + init_angle_screen::ang_w#0 Adding number conversion cast (unumber) $80 in init_angle_screen::$11 = $80 - init_angle_screen::ang_w#0 Adding number conversion cast (unumber) init_angle_screen::$11 in init_angle_screen::$11 = (unumber)$80 - init_angle_screen::ang_w#0 Adding number conversion cast (unumber) $28 in init_angle_screen::screen_topline#1 = init_angle_screen::screen_topline#3 - $28 Adding number conversion cast (unumber) $28 in init_angle_screen::screen_bottomline#1 = init_angle_screen::screen_bottomline#3 + $28 Successful SSA optimization PassNAddNumberTypeConversions Inlining cast init_font_hex::charset#2[init_font_hex::idx#0] = (unumber)0 Inlining cast init_font_hex::charset#4[init_font_hex::idx#6] = (unumber)0 Inlining cast init_font_hex::charset#4[init_font_hex::idx#3] = (unumber)0 Inlining cast *CIA2_TIMER_AB = (unumber)$ffffffff Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 53272 Simplifying constant pointer cast (struct MOS6526_CIA*) 56576 Simplifying constant pointer cast (dword*) 56580 Simplifying constant pointer cast (byte*) 8192 Simplifying constant pointer cast (byte*) 10240 Simplifying constant pointer cast (byte*) 1024 Simplifying constant pointer cast (byte*) 4096 Simplifying constant integer cast 0 Simplifying constant integer cast 4 Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 5 Simplifying constant integer cast 8 Simplifying constant integer cast 5 Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 2 Simplifying constant integer cast 0 Simplifying constant integer cast 2 Simplifying constant integer cast 2 Simplifying constant integer cast 2 Simplifying constant integer cast 2 Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast 1 Simplifying constant integer cast 1 Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast $8000 Simplifying constant integer cast $ffffffff Simplifying constant integer cast $ffffffff Simplifying constant integer cast 2 Simplifying constant integer cast 4 Simplifying constant integer cast 4 Simplifying constant integer cast $f Simplifying constant integer cast 1 Simplifying constant integer cast $3fff Simplifying constant integer cast 4 Simplifying constant integer cast 4 Simplifying constant integer cast $f Simplifying constant integer cast $3fff Simplifying constant integer cast 4 Simplifying constant integer cast 4 Simplifying constant integer cast $f Simplifying constant integer cast $13 Simplifying constant integer cast 2 Simplifying constant integer cast $27 Simplifying constant integer cast 0 Simplifying constant integer cast 2 Simplifying constant integer cast 0 Simplifying constant integer cast $80 Simplifying constant integer cast $80 Simplifying constant integer cast $80 Simplifying constant integer cast $28 Simplifying constant integer cast $28 Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 5 Finalized unsigned number type (byte) 8 Finalized unsigned number type (byte) 5 Finalized signed number type (signed byte) 0 Finalized signed number type (signed byte) 0 Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 2 Finalized signed number type (signed byte) 0 Finalized unsigned number type (byte) 2 Finalized signed number type (signed byte) 2 Finalized signed number type (signed byte) 2 Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) 0 Finalized signed number type (signed byte) 0 Finalized signed number type (signed byte) 1 Finalized signed number type (signed byte) 1 Finalized unsigned number type (byte) 1 Finalized signed number type (signed byte) 0 Finalized unsigned number type (word) $8000 Finalized unsigned number type (dword) $ffffffff Finalized unsigned number type (dword) $ffffffff Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) $f Finalized unsigned number type (byte) 1 Finalized unsigned number type (word) $3fff Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) $f Finalized unsigned number type (word) $3fff Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) 4 Finalized unsigned number type (byte) $f Finalized unsigned number type (byte) $13 Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) $27 Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) $80 Finalized unsigned number type (byte) $80 Finalized unsigned number type (byte) $80 Finalized unsigned number type (byte) $28 Finalized unsigned number type (byte) $28 Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to word in atan2_16::$12 = $8000 - atan2_16::angle#9 Inferred type updated to dword in clock::$0 = $ffffffff - *CIA2_TIMER_AB Inferred type updated to byte in print_uchar_at::$2 = print_uchar_at::b#3 & $f Inferred type updated to word in main::toD0181_$0 = main::toD0181_$7 & $3fff Inferred type updated to word in main::toD0181_$1 = main::toD0181_$0 * 4 Inferred type updated to byte in main::toD0181_$2 = > main::toD0181_$1 Inferred type updated to byte in main::toD0181_$4 = main::toD0181_$3 / 4 Inferred type updated to byte in main::toD0181_$5 = main::toD0181_$4 & $f Inferred type updated to byte in main::toD0181_$6 = main::toD0181_$2 | main::toD0181_$5 Inferred type updated to word in main::toD0182_$0 = main::toD0182_$7 & $3fff Inferred type updated to word in main::toD0182_$1 = main::toD0182_$0 * 4 Inferred type updated to byte in main::toD0182_$2 = > main::toD0182_$1 Inferred type updated to byte in main::toD0182_$4 = main::toD0182_$3 / 4 Inferred type updated to byte in main::toD0182_$5 = main::toD0182_$4 & $f Inferred type updated to byte in main::toD0182_$6 = main::toD0182_$2 | main::toD0182_$5 Inferred type updated to byte in init_angle_screen::$3 = init_angle_screen::x#3 * 2 Inferred type updated to byte in init_angle_screen::$4 = $27 - init_angle_screen::$3 Inferred type updated to byte in init_angle_screen::$5 = init_angle_screen::y#2 * 2 Inferred type updated to word in init_angle_screen::$7 = init_angle_screen::angle_w#0 + $80 Inferred type updated to byte in init_angle_screen::$8 = > init_angle_screen::$7 Inferred type updated to byte in init_angle_screen::$10 = $80 + init_angle_screen::ang_w#0 Inferred type updated to byte in init_angle_screen::$11 = $80 - init_angle_screen::ang_w#0 Inversing boolean not [59] atan2_16::$17 = atan2_16::yi#3 != 0 from [58] atan2_16::$16 = atan2_16::yi#3 == 0 Inversing boolean not [68] atan2_16::$11 = atan2_16::x#4 >= 0 from [67] atan2_16::$10 = atan2_16::x#4 < 0 Inversing boolean not [79] atan2_16::$19 = 0 == atan2_16::shift#4 from [78] atan2_16::$24 = 0 != atan2_16::shift#4 Inversing boolean not [103] atan2_16::$14 = atan2_16::y#4 >= 0 from [102] atan2_16::$13 = atan2_16::y#4 < 0 Successful SSA optimization Pass2UnaryNotSimplification Alias init_font_hex::charset#3 = init_font_hex::charset#4 Alias init_font_hex::idx#2 = init_font_hex::idx#6 Alias init_font_hex::proto_lo#2 = init_font_hex::proto_lo#3 Alias init_font_hex::c1#2 = init_font_hex::c1#3 Alias init_font_hex::proto_hi#2 = init_font_hex::proto_hi#5 init_font_hex::proto_hi#3 Alias init_font_hex::c#2 = init_font_hex::c#3 init_font_hex::c#4 Alias init_font_hex::charset#0 = init_font_hex::charset#7 Alias atan2_16::y#1 = atan2_16::y#2 atan2_16::$3 atan2_16::y#3 Alias atan2_16::x#5 = atan2_16::x#9 atan2_16::x#6 Alias atan2_16::$2 = atan2_16::$1 Alias atan2_16::yi#0 = atan2_16::$4 atan2_16::yi#12 atan2_16::yi#13 Alias atan2_16::x#1 = atan2_16::x#2 atan2_16::$8 atan2_16::x#3 Alias atan2_16::y#12 = atan2_16::y#15 atan2_16::y#13 Alias atan2_16::$7 = atan2_16::$6 Alias atan2_16::xi#0 = atan2_16::$9 Alias atan2_16::xi#3 = atan2_16::xi#6 atan2_16::xd#0 Alias atan2_16::yi#3 = atan2_16::yi#4 atan2_16::yd#0 Alias atan2_16::i#2 = atan2_16::i#6 atan2_16::shift#0 Alias atan2_16::angle#12 = atan2_16::angle#19 Alias atan2_16::x#17 = atan2_16::x#7 Alias atan2_16::y#19 = atan2_16::y#7 Alias atan2_16::xd#3 = atan2_16::xd#7 atan2_16::xd#8 atan2_16::xd#4 Alias atan2_16::yd#3 = atan2_16::yd#7 atan2_16::yd#8 atan2_16::yd#4 Alias atan2_16::shift#2 = atan2_16::shift#3 atan2_16::shift#4 Alias atan2_16::yi#10 = atan2_16::yi#15 atan2_16::yi#14 atan2_16::yi#11 Alias atan2_16::xi#10 = atan2_16::xi#12 atan2_16::xi#11 atan2_16::xi#9 Alias atan2_16::i#10 = atan2_16::i#11 atan2_16::i#8 atan2_16::i#9 Alias atan2_16::angle#16 = atan2_16::angle#20 atan2_16::angle#18 atan2_16::angle#17 Alias atan2_16::x#14 = atan2_16::x#18 atan2_16::x#16 atan2_16::x#15 Alias atan2_16::y#16 = atan2_16::y#20 atan2_16::y#18 atan2_16::y#17 Alias atan2_16::xi#4 = atan2_16::xi#7 atan2_16::xi#5 Alias atan2_16::yd#5 = atan2_16::yd#9 atan2_16::yd#6 Alias atan2_16::yi#5 = atan2_16::yi#6 atan2_16::yi#7 Alias atan2_16::xd#5 = atan2_16::xd#9 atan2_16::xd#6 Alias atan2_16::i#3 = atan2_16::i#7 atan2_16::i#4 Alias atan2_16::angle#14 = atan2_16::angle#7 atan2_16::angle#8 Alias atan2_16::x#11 = atan2_16::x#13 atan2_16::x#12 Alias atan2_16::y#10 = atan2_16::y#14 atan2_16::y#11 Alias atan2_16::angle#1 = atan2_16::angle#9 Alias atan2_16::y#5 = atan2_16::y#6 Alias atan2_16::angle#4 = atan2_16::$12 Alias atan2_16::return#0 = atan2_16::angle#10 atan2_16::return#3 atan2_16::return#1 Alias atan2_16::angle#11 = atan2_16::angle#15 Alias atan2_16::angle#5 = atan2_16::$15 Alias clock::return#0 = clock::$0 clock::return#3 clock::return#1 Alias print_uchar_at::b#0 = print_uint_at::$0 Alias print_uint_at::w#2 = print_uint_at::w#3 Alias print_uint_at::at#2 = print_uint_at::at#3 Alias print_uchar_at::b#1 = print_uint_at::$2 Alias print_uchar_at::at#1 = print_uint_at::$3 Alias print_uint_at::w#0 = print_ulong_at::$0 Alias print_ulong_at::dw#1 = print_ulong_at::dw#2 Alias print_ulong_at::at#1 = print_ulong_at::at#2 Alias print_uint_at::w#1 = print_ulong_at::$2 Alias print_uint_at::at#1 = print_ulong_at::$3 Alias print_uchar_at::b#2 = print_uchar_at::b#3 Alias print_uchar_at::at#2 = print_uchar_at::at#3 Alias print_char_at::at#1 = print_uchar_at::$3 Alias main::toD0181_screen#0 = main::toD0181_screen#1 Alias main::toD0181_gfx#0 = main::toD0181_gfx#1 Alias main::toD0181_return#0 = main::toD0181_$6 main::toD0181_return#2 main::toD0181_return#1 main::toD0181_return#3 main::$1 Alias clock::return#2 = clock::return#4 Alias main::cyclecount#0 = main::$5 Alias main::toD0182_screen#0 = main::toD0182_screen#1 Alias main::toD0182_gfx#0 = main::toD0182_gfx#1 Alias main::toD0182_return#0 = main::toD0182_$6 main::toD0182_return#2 main::toD0182_return#1 main::toD0182_return#3 main::$7 Alias init_angle_screen::screen_topline#0 = init_angle_screen::$0 Alias init_angle_screen::screen_bottomline#0 = init_angle_screen::$1 Alias init_angle_screen::x#2 = init_angle_screen::x#3 init_angle_screen::x#4 Alias init_angle_screen::y#2 = init_angle_screen::y#4 init_angle_screen::y#6 init_angle_screen::y#3 Alias init_angle_screen::screen_bottomline#2 = init_angle_screen::screen_bottomline#4 init_angle_screen::screen_bottomline#5 init_angle_screen::screen_bottomline#3 Alias init_angle_screen::xb#2 = init_angle_screen::xb#3 init_angle_screen::xb#4 Alias init_angle_screen::screen_topline#2 = init_angle_screen::screen_topline#4 init_angle_screen::screen_topline#5 init_angle_screen::screen_topline#3 Alias atan2_16::return#2 = atan2_16::return#4 Alias init_angle_screen::angle_w#0 = init_angle_screen::$6 Alias init_angle_screen::ang_w#0 = init_angle_screen::$8 Successful SSA optimization Pass2AliasElimination Alias atan2_16::x#1 = atan2_16::x#5 atan2_16::x#10 Alias atan2_16::y#1 = atan2_16::y#12 atan2_16::y#9 Alias atan2_16::yi#0 = atan2_16::yi#9 Alias atan2_16::yi#10 = atan2_16::yi#5 Alias atan2_16::xi#10 = atan2_16::xi#4 Alias atan2_16::i#10 = atan2_16::i#3 atan2_16::i#5 Alias atan2_16::angle#14 = atan2_16::angle#16 Alias atan2_16::x#11 = atan2_16::x#14 atan2_16::x#8 Alias atan2_16::y#10 = atan2_16::y#16 atan2_16::y#8 Alias atan2_16::y#4 = atan2_16::y#5 Successful SSA optimization Pass2AliasElimination Identical Phi Values init_font_hex::charset#6 init_font_hex::charset#1 Identical Phi Values init_font_hex::proto_hi#2 init_font_hex::proto_hi#4 Identical Phi Values init_font_hex::proto_lo#2 init_font_hex::proto_lo#4 Identical Phi Values init_font_hex::charset#3 init_font_hex::charset#2 Identical Phi Values init_font_hex::c1#2 init_font_hex::c1#4 Identical Phi Values init_font_hex::c#2 init_font_hex::c#5 Identical Phi Values atan2_16::y#1 atan2_16::y#0 Identical Phi Values atan2_16::x#1 atan2_16::x#0 Identical Phi Values atan2_16::yi#10 atan2_16::yi#3 Identical Phi Values atan2_16::xi#10 atan2_16::xi#3 Identical Phi Values atan2_16::i#10 atan2_16::i#2 Identical Phi Values atan2_16::angle#14 atan2_16::angle#12 Identical Phi Values atan2_16::x#11 atan2_16::x#17 Identical Phi Values atan2_16::y#10 atan2_16::y#19 Identical Phi Values print_ulong_at::dw#1 print_ulong_at::dw#0 Identical Phi Values print_ulong_at::at#1 print_ulong_at::at#0 Identical Phi Values init_angle_screen::screen#1 init_angle_screen::screen#0 Identical Phi Values init_angle_screen::y#2 init_angle_screen::y#5 Identical Phi Values init_angle_screen::screen_topline#2 init_angle_screen::screen_topline#6 Identical Phi Values init_angle_screen::screen_bottomline#2 init_angle_screen::screen_bottomline#6 Successful SSA optimization Pass2IdenticalPhiElimination Identical Phi Values init_font_hex::proto_hi#4 init_font_hex::proto_hi#6 Identical Phi Values init_font_hex::c#5 init_font_hex::c#6 Identical Phi Values atan2_16::x#17 atan2_16::x#0 Identical Phi Values atan2_16::y#19 atan2_16::y#0 Identical Phi Values atan2_16::x#4 atan2_16::x#17 Identical Phi Values atan2_16::y#4 atan2_16::y#19 Successful SSA optimization Pass2IdenticalPhiElimination Identified duplicate assignment right side [218] init_angle_screen::screen_bottomline#0 = init_angle_screen::screen#0 + (word)$28*$c Successful SSA optimization Pass2DuplicateRValueIdentification Simple Condition init_font_hex::$3 [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 Simple Condition init_font_hex::$4 [28] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 Simple Condition init_font_hex::$5 [32] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 Simple Condition atan2_16::$0 [36] if(atan2_16::y#0>=0) goto atan2_16::@1 Simple Condition atan2_16::$5 [40] if(atan2_16::x#0>=0) goto atan2_16::@4 Simple Condition atan2_16::$17 [47] if(atan2_16::yi#3!=0) goto atan2_16::@11 Simple Condition atan2_16::$11 [51] if(atan2_16::x#0>=0) goto atan2_16::@7 Simple Condition atan2_16::$18 [54] if(atan2_16::shift#2>=2) goto atan2_16::@14 Simple Condition atan2_16::$19 [59] if(0==atan2_16::shift#2) goto atan2_16::@17 Simple Condition atan2_16::$20 [62] if(atan2_16::yi#3>=0) goto atan2_16::@18 Simple Condition atan2_16::$21 [76] if(atan2_16::i#1!=rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@10 Simple Condition atan2_16::$14 [79] if(atan2_16::y#0>=0) goto atan2_16::@8 Simple Condition init_angle_screen::$2 [165] if(init_angle_screen::x#2<=$13) goto init_angle_screen::@3 Simple Condition init_angle_screen::$12 [193] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 Successful SSA optimization Pass2ConditionalJumpSimplification Negating conditional jump and destination [76] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@12 Successful SSA optimization Pass2ConditionalJumpSequenceImprovement Constant init_font_hex::proto_hi#0 = FONT_HEX_PROTO Constant init_font_hex::c#0 = 0 Constant init_font_hex::proto_lo#0 = FONT_HEX_PROTO Constant init_font_hex::c1#0 = 0 Constant init_font_hex::idx#0 = 0 Constant init_font_hex::i#0 = 0 Constant atan2_16::angle#0 = 0 Constant atan2_16::i#0 = 0 Constant init_font_hex::charset#1 = CHARSET Constant main::toD0181_screen#0 = SCREEN Constant main::toD0181_gfx#0 = CHARSET Constant init_angle_screen::screen#0 = SCREEN Constant print_ulong_at::at#0 = main::BASE_SCREEN Constant main::toD0182_screen#0 = main::BASE_SCREEN Constant main::toD0182_gfx#0 = main::BASE_CHARSET Constant init_angle_screen::y#0 = 0 Constant init_angle_screen::x#0 = 0 Constant init_angle_screen::xb#0 = $27 Successful SSA optimization Pass2ConstantIdentification Constant print_uint_at::at#0 = print_ulong_at::at#0 Constant main::toD0181_$7 = (word)main::toD0181_screen#0 Constant main::toD0182_$7 = (word)main::toD0182_screen#0 Successful SSA optimization Pass2ConstantIdentification Constant value identified (word)main::toD0181_gfx#0 in [129] main::toD0181_$3 = > (word)main::toD0181_gfx#0 Constant value identified (word)main::toD0182_gfx#0 in [150] main::toD0182_$3 = > (word)main::toD0182_gfx#0 Successful SSA optimization Pass2ConstantValues Resolved ranged next value [17] init_font_hex::i#1 = ++ init_font_hex::i#2 to ++ Resolved ranged comparison value [19] if(init_font_hex::i#1!=rangelast(0,4)) goto init_font_hex::@3 to 5 Resolved ranged next value [26] init_font_hex::c1#1 = ++ init_font_hex::c1#4 to ++ Resolved ranged comparison value [28] if(init_font_hex::c1#1!=rangelast(0,$f)) goto init_font_hex::@2 to $10 Resolved ranged next value [30] init_font_hex::c#1 = ++ init_font_hex::c#6 to ++ Resolved ranged comparison value [32] if(init_font_hex::c#1!=rangelast(0,$f)) goto init_font_hex::@1 to $10 Resolved ranged next value [74] atan2_16::i#1 = ++ atan2_16::i#2 to ++ Resolved ranged comparison value [76] if(atan2_16::i#1==rangelast(0,CORDIC_ITERATIONS_16-1)) goto atan2_16::@12 to CORDIC_ITERATIONS_16-1+1 Resolved ranged next value [191] init_angle_screen::y#1 = ++ init_angle_screen::y#5 to ++ Resolved ranged comparison value [193] if(init_angle_screen::y#1!=rangelast(0,$c)) goto init_angle_screen::@1 to $d Rewriting conditional comparison [165] if(init_angle_screen::x#2<=$13) goto init_angle_screen::@3 Simplifying constant evaluating to zero CIA_TIMER_CONTROL_STOP|CIA_TIMER_CONTROL_CONTINUOUS|CIA_TIMER_CONTROL_A_COUNT_CYCLES in [86] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = CIA_TIMER_CONTROL_STOP|CIA_TIMER_CONTROL_CONTINUOUS|CIA_TIMER_CONTROL_A_COUNT_CYCLES Simplifying constant evaluating to zero CIA_TIMER_CONTROL_STOP|CIA_TIMER_CONTROL_CONTINUOUS in [87] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = CIA_TIMER_CONTROL_STOP|CIA_TIMER_CONTROL_CONTINUOUS|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A Successful SSA optimization PassNSimplifyConstantZero Simplifying expression containing zero init_font_hex::charset#2 in [8] init_font_hex::charset#2[init_font_hex::idx#0] = 0 Simplifying expression containing zero CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A in [87] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = 0|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A Simplifying expression containing zero CIA_TIMER_CONTROL_START in [89] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A Simplifying expression containing zero CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS in [90] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS|CIA_TIMER_CONTROL_A_COUNT_CYCLES Successful SSA optimization PassNSimplifyExpressionWithZero Simplifying expression containing zero CIA_TIMER_CONTROL_START in [90] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_CONTINUOUS Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable init_font_hex::idx#4 and assignment [15] init_font_hex::idx#4 = ++ init_font_hex::idx#3 Eliminating unused constant CIA_TIMER_CONTROL_STOP Eliminating unused constant CIA_TIMER_CONTROL_CONTINUOUS Eliminating unused constant CIA_TIMER_CONTROL_A_COUNT_CYCLES Successful SSA optimization PassNEliminateUnusedVars Removing unused procedure __start Removing unused procedure block __start Removing unused procedure block __start::__init1 Removing unused procedure block __start::@1 Removing unused procedure block __start::@2 Removing unused procedure block __start::@return Successful SSA optimization PassNEliminateEmptyStart Adding number conversion cast (unumber) 5 in [11] if(init_font_hex::i#1!=5) goto init_font_hex::@3 Adding number conversion cast (unumber) $10 in [18] if(init_font_hex::c1#1!=$10) goto init_font_hex::@2 Adding number conversion cast (unumber) $10 in [21] if(init_font_hex::c#1!=$10) goto init_font_hex::@1 Adding number conversion cast (unumber) CORDIC_ITERATIONS_16-1+1 in [54] if(atan2_16::i#1==CORDIC_ITERATIONS_16-1+1) goto atan2_16::@12 Adding number conversion cast (unumber) 1 in [54] if(atan2_16::i#1==(unumber)CORDIC_ITERATIONS_16-1+1) goto atan2_16::@12 Adding number conversion cast (unumber) $13+1 in [126] if(init_angle_screen::x#2<$13+1) goto init_angle_screen::@3 Adding number conversion cast (unumber) 1 in [126] if(init_angle_screen::x#2<(unumber)$13+1) goto init_angle_screen::@3 Adding number conversion cast (unumber) $d in [153] if(init_angle_screen::y#1!=$d) goto init_angle_screen::@1 Successful SSA optimization PassNAddNumberTypeConversions Simplifying constant integer cast 5 Simplifying constant integer cast $10 Simplifying constant integer cast $10 Simplifying constant integer cast CORDIC_ITERATIONS_16-1+(unumber)1 Simplifying constant integer cast 1 Simplifying constant integer cast $13+(unumber)1 Simplifying constant integer cast 1 Simplifying constant integer cast init_angle_screen::$4 Simplifying constant integer cast init_angle_screen::$5 Simplifying constant integer cast $d Successful SSA optimization PassNCastSimplification Finalized unsigned number type (byte) 5 Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) $d Successful SSA optimization PassNFinalizeNumberTypeConversions Alias init_angle_screen::screen_bottomline#0 = init_angle_screen::screen_topline#0 Successful SSA optimization Pass2AliasElimination Constant right-side identified [3] init_font_hex::idx#1 = ++ init_font_hex::idx#0 Constant right-side identified [80] print_uint_at::at#1 = print_ulong_at::at#0 + 4 Constant right-side identified [97] main::toD0181_$0 = main::toD0181_$7 & $3fff Constant right-side identified [100] main::toD0181_$3 = > (word)main::toD0181_gfx#0 Constant right-side identified [113] main::toD0182_$0 = main::toD0182_$7 & $3fff Constant right-side identified [116] main::toD0182_$3 = > (word)main::toD0182_gfx#0 Constant right-side identified [122] init_angle_screen::screen_bottomline#0 = init_angle_screen::screen#0 + (word)$28*$c Successful SSA optimization Pass2ConstantRValueConsolidation Constant init_font_hex::idx#1 = ++init_font_hex::idx#0 Constant print_uint_at::at#1 = print_ulong_at::at#0+4 Constant main::toD0181_$0 = main::toD0181_$7&$3fff Constant main::toD0181_$3 = >(word)main::toD0181_gfx#0 Constant main::toD0182_$0 = main::toD0182_$7&$3fff Constant main::toD0182_$3 = >(word)main::toD0182_gfx#0 Constant init_angle_screen::screen_bottomline#0 = init_angle_screen::screen#0+(word)$28*$c Successful SSA optimization Pass2ConstantIdentification Constant right-side identified [95] main::toD0181_$1 = main::toD0181_$0 * 4 Constant right-side identified [97] main::toD0181_$4 = main::toD0181_$3 / 4 Constant right-side identified [109] main::toD0182_$1 = main::toD0182_$0 * 4 Constant right-side identified [111] main::toD0182_$4 = main::toD0182_$3 / 4 Successful SSA optimization Pass2ConstantRValueConsolidation Constant main::toD0181_$1 = main::toD0181_$0*4 Constant main::toD0181_$4 = main::toD0181_$3/4 Constant main::toD0182_$1 = main::toD0182_$0*4 Constant main::toD0182_$4 = main::toD0182_$3/4 Successful SSA optimization Pass2ConstantIdentification Constant right-side identified [95] main::toD0181_$2 = > main::toD0181_$1 Constant right-side identified [96] main::toD0181_$5 = main::toD0181_$4 & $f Constant right-side identified [107] main::toD0182_$2 = > main::toD0182_$1 Constant right-side identified [108] main::toD0182_$5 = main::toD0182_$4 & $f Successful SSA optimization Pass2ConstantRValueConsolidation Constant main::toD0181_$2 = >main::toD0181_$1 Constant main::toD0181_$5 = main::toD0181_$4&$f Constant main::toD0182_$2 = >main::toD0182_$1 Constant main::toD0182_$5 = main::toD0182_$4&$f Successful SSA optimization Pass2ConstantIdentification Constant right-side identified [95] main::toD0181_return#0 = main::toD0181_$2 | main::toD0181_$5 Constant right-side identified [105] main::toD0182_return#0 = main::toD0182_$2 | main::toD0182_$5 Successful SSA optimization Pass2ConstantRValueConsolidation Constant main::toD0181_return#0 = main::toD0181_$2|main::toD0181_$5 Constant main::toD0182_return#0 = main::toD0182_$2|main::toD0182_$5 Successful SSA optimization Pass2ConstantIdentification Inlining Noop Cast [112] init_angle_screen::xw#0 = (signed word)init_angle_screen::$13 keeping init_angle_screen::xw#0 Inlining Noop Cast [115] init_angle_screen::yw#0 = (signed word)init_angle_screen::$14 keeping init_angle_screen::yw#0 Successful SSA optimization Pass2NopCastInlining Rewriting division to use shift [31] atan2_16::angle#1 = atan2_16::angle#6 / 2 Rewriting multiplication to use shift [45] atan2_16::$22 = atan2_16::i#2 * SIZEOF_WORD Rewriting multiplication to use shift [49] atan2_16::$23 = atan2_16::i#2 * SIZEOF_WORD Rewriting multiplication to use shift [109] init_angle_screen::$3 = init_angle_screen::x#2 * 2 Rewriting multiplication to use shift [113] init_angle_screen::$5 = init_angle_screen::y#5 * 2 Successful SSA optimization Pass2MultiplyToShiftRewriting Inlining constant with var siblings init_font_hex::proto_hi#0 Inlining constant with var siblings init_font_hex::c#0 Inlining constant with var siblings init_font_hex::proto_lo#0 Inlining constant with var siblings init_font_hex::c1#0 Inlining constant with var siblings init_font_hex::idx#0 Inlining constant with var siblings init_font_hex::i#0 Inlining constant with var siblings init_font_hex::charset#1 Inlining constant with var siblings init_font_hex::idx#1 Inlining constant with var siblings atan2_16::angle#0 Inlining constant with var siblings atan2_16::i#0 Inlining constant with var siblings print_uint_at::at#0 Inlining constant with var siblings print_uint_at::at#1 Inlining constant with var siblings init_angle_screen::y#0 Inlining constant with var siblings init_angle_screen::x#0 Inlining constant with var siblings init_angle_screen::xb#0 Inlining constant with var siblings init_angle_screen::screen_bottomline#0 Constant inlined main::toD0181_screen#0 = SCREEN Constant inlined main::toD0181_gfx#0 = CHARSET Constant inlined print_uint_at::at#1 = main::BASE_SCREEN+4 Constant inlined print_uint_at::at#0 = main::BASE_SCREEN Constant inlined init_font_hex::proto_hi#0 = FONT_HEX_PROTO Constant inlined main::toD0182_$4 = >(word)main::BASE_CHARSET/4 Constant inlined init_angle_screen::y#0 = 0 Constant inlined main::toD0182_$5 = >(word)main::BASE_CHARSET/4&$f Constant inlined init_angle_screen::x#0 = 0 Constant inlined main::toD0182_$7 = (word)main::BASE_SCREEN Constant inlined main::toD0182_$0 = (word)main::BASE_SCREEN&$3fff Constant inlined atan2_16::angle#0 = 0 Constant inlined main::toD0182_$1 = (word)main::BASE_SCREEN&$3fff*4 Constant inlined init_angle_screen::screen_bottomline#0 = SCREEN+(word)$28*$c Constant inlined main::toD0182_$2 = >(word)main::BASE_SCREEN&$3fff*4 Constant inlined main::toD0182_$3 = >(word)main::BASE_CHARSET Constant inlined init_font_hex::charset#1 = CHARSET Constant inlined print_ulong_at::at#0 = main::BASE_SCREEN Constant inlined init_angle_screen::screen#0 = SCREEN Constant inlined init_font_hex::c1#0 = 0 Constant inlined main::toD0181_$7 = (word)SCREEN Constant inlined main::toD0182_gfx#0 = main::BASE_CHARSET Constant inlined init_angle_screen::xb#0 = $27 Constant inlined main::toD0181_$2 = >(word)SCREEN&$3fff*4 Constant inlined atan2_16::i#0 = 0 Constant inlined main::toD0181_$1 = (word)SCREEN&$3fff*4 Constant inlined main::toD0181_$0 = (word)SCREEN&$3fff Constant inlined init_font_hex::i#0 = 0 Constant inlined main::toD0181_$5 = >(word)CHARSET/4&$f Constant inlined main::toD0181_$4 = >(word)CHARSET/4 Constant inlined main::toD0181_$3 = >(word)CHARSET Constant inlined init_font_hex::idx#1 = ++0 Constant inlined init_font_hex::idx#0 = 0 Constant inlined main::toD0182_screen#0 = main::BASE_SCREEN Constant inlined init_font_hex::proto_lo#0 = FONT_HEX_PROTO Constant inlined init_font_hex::c#0 = 0 Successful SSA optimization Pass2ConstantInlining Simplifying constant integer increment ++0 Successful SSA optimization Pass2ConstantSimplification Eliminating unused constant SIZEOF_WORD Successful SSA optimization PassNEliminateUnusedVars Finalized unsigned number type (byte) 2 Finalized unsigned number type (byte) 8 Finalized unsigned number type (byte) $a Finalized unsigned number type (byte) $10 Finalized unsigned number type (byte) $28 Finalized unsigned number type (byte) $c Successful SSA optimization PassNFinalizeNumberTypeConversions Added new block during phi lifting init_font_hex::@6(between init_font_hex::@5 and init_font_hex::@1) Added new block during phi lifting init_font_hex::@7(between init_font_hex::@4 and init_font_hex::@2) Added new block during phi lifting init_font_hex::@8(between init_font_hex::@3 and init_font_hex::@3) Added new block during phi lifting atan2_16::@22(between atan2_16::@19 and atan2_16::@10) Added new block during phi lifting atan2_16::@23(between atan2_16::@10 and atan2_16::@12) Added new block during phi lifting atan2_16::@24(between atan2_16::@19 and atan2_16::@12) Added new block during phi lifting atan2_16::@25(between atan2_16::@15 and atan2_16::@17) Added new block during phi lifting atan2_16::@26(between atan2_16::@12 and atan2_16::@7) Added new block during phi lifting atan2_16::@27(between atan2_16::@7 and atan2_16::@8) Added new block during phi lifting init_angle_screen::@6(between init_angle_screen::@4 and init_angle_screen::@1) Adding NOP phi() at start of main Adding NOP phi() at start of main::@3 Adding NOP phi() at start of main::toD0181 Adding NOP phi() at start of main::toD0181_@return Adding NOP phi() at start of main::@4 Adding NOP phi() at start of main::@5 Adding NOP phi() at start of main::@7 Adding NOP phi() at start of main::toD0182 Adding NOP phi() at start of main::toD0182_@return Adding NOP phi() at start of init_font_hex Adding NOP phi() at start of init_angle_screen Adding NOP phi() at start of print_ulong_at::@2 Adding NOP phi() at start of print_uint_at::@2 Adding NOP phi() at start of print_uchar_at::@2 CALL GRAPH Calls in [main] to init_font_hex:1 clock_start:6 init_angle_screen:8 clock:10 print_ulong_at:15 Calls in [init_angle_screen] to atan2_16:78 Calls in [print_ulong_at] to print_uint_at:98 print_uint_at:101 Calls in [print_uint_at] to print_uchar_at:179 print_uchar_at:184 Calls in [print_uchar_at] to print_char_at:193 print_char_at:199 Created 36 initial phi equivalence classes Coalesced [23] init_font_hex::charset#9 = init_font_hex::charset#5 Coalesced [45] init_font_hex::charset#8 = init_font_hex::charset#0 Coalesced [46] init_font_hex::proto_hi#7 = init_font_hex::proto_hi#1 Coalesced [47] init_font_hex::c#7 = init_font_hex::c#1 Coalesced (already) [48] init_font_hex::charset#10 = init_font_hex::charset#0 Coalesced [49] init_font_hex::proto_lo#5 = init_font_hex::proto_lo#1 Coalesced [50] init_font_hex::c1#5 = init_font_hex::c1#1 Coalesced [51] init_font_hex::i#3 = init_font_hex::i#1 Coalesced [52] init_font_hex::idx#7 = init_font_hex::idx#2 Coalesced [68] init_angle_screen::y#7 = init_angle_screen::y#1 Coalesced [69] init_angle_screen::screen_topline#7 = init_angle_screen::screen_topline#1 Coalesced [70] init_angle_screen::screen_bottomline#7 = init_angle_screen::screen_bottomline#1 Coalesced [92] init_angle_screen::x#5 = init_angle_screen::x#1 Coalesced [93] init_angle_screen::xb#5 = init_angle_screen::xb#1 Coalesced [97] print_uint_at::w#4 = print_uint_at::w#0 Coalesced [100] print_uint_at::w#5 = print_uint_at::w#1 Coalesced [106] atan2_16::yi#17 = atan2_16::$2 Coalesced [110] atan2_16::xi#14 = atan2_16::$7 Coalesced [112] atan2_16::yi#19 = atan2_16::yi#0 Coalesced [113] atan2_16::xi#16 = atan2_16::xi#0 Coalesced [116] atan2_16::angle#22 = atan2_16::angle#12 Coalesced [121] atan2_16::angle#27 = atan2_16::angle#4 Coalesced [125] atan2_16::return#6 = atan2_16::angle#5 Coalesced [128] atan2_16::return#5 = atan2_16::angle#11 Coalesced [129] atan2_16::angle#26 = atan2_16::angle#1 Not coalescing [130] atan2_16::shift#5 = atan2_16::i#2 Not coalescing [131] atan2_16::xd#10 = atan2_16::xi#3 Not coalescing [132] atan2_16::yd#10 = atan2_16::yi#3 Coalesced [138] atan2_16::yd#13 = atan2_16::yd#2 Coalesced [139] atan2_16::xd#13 = atan2_16::xd#2 Coalesced [146] atan2_16::yi#21 = atan2_16::yi#2 Coalesced [147] atan2_16::angle#25 = atan2_16::angle#3 Coalesced [148] atan2_16::xi#18 = atan2_16::xi#2 Coalesced [152] atan2_16::yi#18 = atan2_16::yi#8 Coalesced [153] atan2_16::xi#15 = atan2_16::xi#8 Coalesced [154] atan2_16::i#12 = atan2_16::i#1 Coalesced [155] atan2_16::angle#21 = atan2_16::angle#13 Coalesced (already) [156] atan2_16::angle#23 = atan2_16::angle#13 Coalesced [161] atan2_16::yi#20 = atan2_16::yi#1 Coalesced [162] atan2_16::angle#24 = atan2_16::angle#2 Coalesced [163] atan2_16::xi#17 = atan2_16::xi#1 Coalesced [164] atan2_16::yd#12 = atan2_16::yd#3 Coalesced [165] atan2_16::xd#12 = atan2_16::xd#3 Coalesced [169] atan2_16::shift#6 = atan2_16::shift#1 Coalesced [170] atan2_16::xd#11 = atan2_16::xd#1 Coalesced [171] atan2_16::yd#11 = atan2_16::yd#1 Not coalescing [172] atan2_16::xi#13 = atan2_16::x#0 Not coalescing [173] atan2_16::yi#16 = atan2_16::y#0 Coalesced [177] print_uchar_at::b#4 = print_uchar_at::b#0 Coalesced [178] print_uchar_at::at#4 = print_uchar_at::at#0 Coalesced [182] print_uchar_at::b#5 = print_uchar_at::b#1 Coalesced [183] print_uchar_at::at#5 = print_uchar_at::at#1 Coalesced [191] print_char_at::ch#3 = print_char_at::ch#0 Coalesced [192] print_char_at::at#3 = print_char_at::at#0 Coalesced [197] print_char_at::ch#4 = print_char_at::ch#1 Coalesced [198] print_char_at::at#4 = print_char_at::at#1 Coalesced down to 28 phi equivalence classes Culled Empty Block label main::@3 Culled Empty Block label main::toD0181_@return Culled Empty Block label main::@7 Culled Empty Block label main::toD0182_@return Culled Empty Block label init_font_hex::@6 Culled Empty Block label init_font_hex::@7 Culled Empty Block label init_font_hex::@8 Culled Empty Block label init_angle_screen::@6 Culled Empty Block label print_ulong_at::@2 Culled Empty Block label atan2_16::@23 Culled Empty Block label atan2_16::@27 Culled Empty Block label atan2_16::@26 Culled Empty Block label atan2_16::@22 Culled Empty Block label atan2_16::@24 Culled Empty Block label atan2_16::@25 Culled Empty Block label print_uint_at::@2 Culled Empty Block label print_uchar_at::@2 Renumbering block main::@4 to main::@3 Renumbering block main::@5 to main::@4 Renumbering block main::@6 to main::@5 Adding NOP phi() at start of main Adding NOP phi() at start of main::toD0181 Adding NOP phi() at start of main::@3 Adding NOP phi() at start of main::@4 Adding NOP phi() at start of main::toD0182 Adding NOP phi() at start of init_font_hex Adding NOP phi() at start of init_angle_screen FINAL CONTROL FLOW GRAPH void main() main: scope:[main] from [0] phi() [1] call init_font_hex to:main::toD0181 main::toD0181: scope:[main] from main [2] phi() to:main::@1 main::@1: scope:[main] from main::toD0181 [3] *D018 = main::toD0181_return#0 [4] call clock_start to:main::@3 main::@3: scope:[main] from main::@1 [5] phi() [6] call init_angle_screen to:main::@4 main::@4: scope:[main] from main::@3 [7] phi() [8] call clock [9] clock::return#2 = clock::return#0 to:main::@5 main::@5: scope:[main] from main::@4 [10] main::$4 = clock::return#2 [11] main::cyclecount#0 = main::$4 - CLOCKS_PER_INIT [12] print_ulong_at::dw#0 = main::cyclecount#0 [13] call print_ulong_at to:main::toD0182 main::toD0182: scope:[main] from main::@5 [14] phi() to:main::@2 main::@2: scope:[main] from main::toD0182 [15] *D018 = main::toD0182_return#0 to:main::@return main::@return: scope:[main] from main::@2 [16] return to:@return void init_font_hex(byte* init_font_hex::charset) init_font_hex: scope:[init_font_hex] from main [17] phi() to:init_font_hex::@1 init_font_hex::@1: scope:[init_font_hex] from init_font_hex init_font_hex::@5 [18] init_font_hex::c#6 = phi( init_font_hex/0, init_font_hex::@5/init_font_hex::c#1 ) [18] init_font_hex::proto_hi#6 = phi( init_font_hex/FONT_HEX_PROTO, init_font_hex::@5/init_font_hex::proto_hi#1 ) [18] init_font_hex::charset#5 = phi( init_font_hex/CHARSET, init_font_hex::@5/init_font_hex::charset#0 ) to:init_font_hex::@2 init_font_hex::@2: scope:[init_font_hex] from init_font_hex::@1 init_font_hex::@4 [19] init_font_hex::c1#4 = phi( init_font_hex::@1/0, init_font_hex::@4/init_font_hex::c1#1 ) [19] init_font_hex::proto_lo#4 = phi( init_font_hex::@1/FONT_HEX_PROTO, init_font_hex::@4/init_font_hex::proto_lo#1 ) [19] init_font_hex::charset#2 = phi( init_font_hex::@1/init_font_hex::charset#5, init_font_hex::@4/init_font_hex::charset#0 ) [20] *init_font_hex::charset#2 = 0 to:init_font_hex::@3 init_font_hex::@3: scope:[init_font_hex] from init_font_hex::@2 init_font_hex::@3 [21] init_font_hex::idx#5 = phi( init_font_hex::@2/1, init_font_hex::@3/init_font_hex::idx#2 ) [21] init_font_hex::i#2 = phi( init_font_hex::@2/0, init_font_hex::@3/init_font_hex::i#1 ) [22] init_font_hex::$0 = init_font_hex::proto_hi#6[init_font_hex::i#2] << 4 [23] init_font_hex::$1 = init_font_hex::proto_lo#4[init_font_hex::i#2] << 1 [24] init_font_hex::$2 = init_font_hex::$0 | init_font_hex::$1 [25] init_font_hex::charset#2[init_font_hex::idx#5] = init_font_hex::$2 [26] init_font_hex::idx#2 = ++ init_font_hex::idx#5 [27] init_font_hex::i#1 = ++ init_font_hex::i#2 [28] if(init_font_hex::i#1!=5) goto init_font_hex::@3 to:init_font_hex::@4 init_font_hex::@4: scope:[init_font_hex] from init_font_hex::@3 [29] init_font_hex::charset#2[init_font_hex::idx#2] = 0 [30] init_font_hex::idx#3 = ++ init_font_hex::idx#2 [31] init_font_hex::charset#2[init_font_hex::idx#3] = 0 [32] init_font_hex::proto_lo#1 = init_font_hex::proto_lo#4 + 5 [33] init_font_hex::charset#0 = init_font_hex::charset#2 + 8 [34] init_font_hex::c1#1 = ++ init_font_hex::c1#4 [35] if(init_font_hex::c1#1!=$10) goto init_font_hex::@2 to:init_font_hex::@5 init_font_hex::@5: scope:[init_font_hex] from init_font_hex::@4 [36] init_font_hex::proto_hi#1 = init_font_hex::proto_hi#6 + 5 [37] init_font_hex::c#1 = ++ init_font_hex::c#6 [38] if(init_font_hex::c#1!=$10) goto init_font_hex::@1 to:init_font_hex::@return init_font_hex::@return: scope:[init_font_hex] from init_font_hex::@5 [39] return to:@return void clock_start() clock_start: scope:[clock_start] from main::@1 [40] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = 0 [41] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A [42] *CIA2_TIMER_AB = $ffffffff [43] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A [44] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = CIA_TIMER_CONTROL_START to:clock_start::@return clock_start::@return: scope:[clock_start] from clock_start [45] return to:@return void init_angle_screen(byte* init_angle_screen::screen) init_angle_screen: scope:[init_angle_screen] from main::@3 [46] phi() to:init_angle_screen::@1 init_angle_screen::@1: scope:[init_angle_screen] from init_angle_screen init_angle_screen::@4 [47] init_angle_screen::screen_bottomline#6 = phi( init_angle_screen/SCREEN+(word)$28*$c, init_angle_screen::@4/init_angle_screen::screen_bottomline#1 ) [47] init_angle_screen::screen_topline#6 = phi( init_angle_screen/SCREEN+(word)$28*$c, init_angle_screen::@4/init_angle_screen::screen_topline#1 ) [47] init_angle_screen::y#5 = phi( init_angle_screen/0, init_angle_screen::@4/init_angle_screen::y#1 ) to:init_angle_screen::@2 init_angle_screen::@2: scope:[init_angle_screen] from init_angle_screen::@1 init_angle_screen::@5 [48] init_angle_screen::xb#2 = phi( init_angle_screen::@1/$27, init_angle_screen::@5/init_angle_screen::xb#1 ) [48] init_angle_screen::x#2 = phi( init_angle_screen::@1/0, init_angle_screen::@5/init_angle_screen::x#1 ) [49] if(init_angle_screen::x#2<$13+1) goto init_angle_screen::@3 to:init_angle_screen::@4 init_angle_screen::@4: scope:[init_angle_screen] from init_angle_screen::@2 [50] init_angle_screen::screen_topline#1 = init_angle_screen::screen_topline#6 - $28 [51] init_angle_screen::screen_bottomline#1 = init_angle_screen::screen_bottomline#6 + $28 [52] init_angle_screen::y#1 = ++ init_angle_screen::y#5 [53] if(init_angle_screen::y#1!=$d) goto init_angle_screen::@1 to:init_angle_screen::@return init_angle_screen::@return: scope:[init_angle_screen] from init_angle_screen::@4 [54] return to:@return init_angle_screen::@3: scope:[init_angle_screen] from init_angle_screen::@2 [55] init_angle_screen::$3 = init_angle_screen::x#2 << 1 [56] init_angle_screen::$4 = $27 - init_angle_screen::$3 [57] init_angle_screen::xw#0 = init_angle_screen::$4 w= 0 [58] init_angle_screen::$5 = init_angle_screen::y#5 << 1 [59] init_angle_screen::yw#0 = init_angle_screen::$5 w= 0 [60] atan2_16::x#0 = (signed word)init_angle_screen::xw#0 [61] atan2_16::y#0 = (signed word)init_angle_screen::yw#0 [62] call atan2_16 [63] atan2_16::return#2 = atan2_16::return#0 to:init_angle_screen::@5 init_angle_screen::@5: scope:[init_angle_screen] from init_angle_screen::@3 [64] init_angle_screen::angle_w#0 = atan2_16::return#2 [65] init_angle_screen::$7 = init_angle_screen::angle_w#0 + $80 [66] init_angle_screen::ang_w#0 = > init_angle_screen::$7 [67] init_angle_screen::screen_bottomline#6[init_angle_screen::xb#2] = init_angle_screen::ang_w#0 [68] init_angle_screen::$9 = - init_angle_screen::ang_w#0 [69] init_angle_screen::screen_topline#6[init_angle_screen::xb#2] = init_angle_screen::$9 [70] init_angle_screen::$10 = $80 + init_angle_screen::ang_w#0 [71] init_angle_screen::screen_topline#6[init_angle_screen::x#2] = init_angle_screen::$10 [72] init_angle_screen::$11 = $80 - init_angle_screen::ang_w#0 [73] init_angle_screen::screen_bottomline#6[init_angle_screen::x#2] = init_angle_screen::$11 [74] init_angle_screen::x#1 = ++ init_angle_screen::x#2 [75] init_angle_screen::xb#1 = -- init_angle_screen::xb#2 to:init_angle_screen::@2 dword clock() clock: scope:[clock] from main::@4 [76] clock::return#0 = $ffffffff - *CIA2_TIMER_AB to:clock::@return clock::@return: scope:[clock] from clock [77] return to:@return void print_ulong_at(dword print_ulong_at::dw , byte* print_ulong_at::at) print_ulong_at: scope:[print_ulong_at] from main::@5 [78] print_uint_at::w#0 = > print_ulong_at::dw#0 [79] call print_uint_at to:print_ulong_at::@1 print_ulong_at::@1: scope:[print_ulong_at] from print_ulong_at [80] print_uint_at::w#1 = < print_ulong_at::dw#0 [81] call print_uint_at to:print_ulong_at::@return print_ulong_at::@return: scope:[print_ulong_at] from print_ulong_at::@1 [82] return to:@return word atan2_16(signed word atan2_16::x , signed word atan2_16::y) atan2_16: scope:[atan2_16] from init_angle_screen::@3 [83] if(atan2_16::y#0>=0) goto atan2_16::@1 to:atan2_16::@2 atan2_16::@2: scope:[atan2_16] from atan2_16 [84] atan2_16::$2 = - atan2_16::y#0 to:atan2_16::@3 atan2_16::@3: scope:[atan2_16] from atan2_16::@1 atan2_16::@2 [85] atan2_16::yi#0 = phi( atan2_16::@1/atan2_16::yi#16, atan2_16::@2/atan2_16::$2 ) [86] if(atan2_16::x#0>=0) goto atan2_16::@4 to:atan2_16::@5 atan2_16::@5: scope:[atan2_16] from atan2_16::@3 [87] atan2_16::$7 = - atan2_16::x#0 to:atan2_16::@6 atan2_16::@6: scope:[atan2_16] from atan2_16::@4 atan2_16::@5 [88] atan2_16::xi#0 = phi( atan2_16::@4/atan2_16::xi#13, atan2_16::@5/atan2_16::$7 ) to:atan2_16::@10 atan2_16::@10: scope:[atan2_16] from atan2_16::@19 atan2_16::@6 [89] atan2_16::angle#12 = phi( atan2_16::@19/atan2_16::angle#13, atan2_16::@6/0 ) [89] atan2_16::i#2 = phi( atan2_16::@19/atan2_16::i#1, atan2_16::@6/0 ) [89] atan2_16::xi#3 = phi( atan2_16::@19/atan2_16::xi#8, atan2_16::@6/atan2_16::xi#0 ) [89] atan2_16::yi#3 = phi( atan2_16::@19/atan2_16::yi#8, atan2_16::@6/atan2_16::yi#0 ) [90] if(atan2_16::yi#3!=0) goto atan2_16::@11 to:atan2_16::@12 atan2_16::@12: scope:[atan2_16] from atan2_16::@10 atan2_16::@19 [91] atan2_16::angle#6 = phi( atan2_16::@10/atan2_16::angle#12, atan2_16::@19/atan2_16::angle#13 ) [92] atan2_16::angle#1 = atan2_16::angle#6 >> 1 [93] if(atan2_16::x#0>=0) goto atan2_16::@7 to:atan2_16::@21 atan2_16::@21: scope:[atan2_16] from atan2_16::@12 [94] atan2_16::angle#4 = $8000 - atan2_16::angle#1 to:atan2_16::@7 atan2_16::@7: scope:[atan2_16] from atan2_16::@12 atan2_16::@21 [95] atan2_16::angle#11 = phi( atan2_16::@12/atan2_16::angle#1, atan2_16::@21/atan2_16::angle#4 ) [96] if(atan2_16::y#0>=0) goto atan2_16::@8 to:atan2_16::@9 atan2_16::@9: scope:[atan2_16] from atan2_16::@7 [97] atan2_16::angle#5 = - atan2_16::angle#11 to:atan2_16::@8 atan2_16::@8: scope:[atan2_16] from atan2_16::@7 atan2_16::@9 [98] atan2_16::return#0 = phi( atan2_16::@7/atan2_16::angle#11, atan2_16::@9/atan2_16::angle#5 ) to:atan2_16::@return atan2_16::@return: scope:[atan2_16] from atan2_16::@8 [99] return to:@return atan2_16::@11: scope:[atan2_16] from atan2_16::@10 [100] atan2_16::shift#5 = atan2_16::i#2 [101] atan2_16::xd#10 = atan2_16::xi#3 [102] atan2_16::yd#10 = atan2_16::yi#3 to:atan2_16::@13 atan2_16::@13: scope:[atan2_16] from atan2_16::@11 atan2_16::@14 [103] atan2_16::yd#3 = phi( atan2_16::@11/atan2_16::yd#10, atan2_16::@14/atan2_16::yd#1 ) [103] atan2_16::xd#3 = phi( atan2_16::@11/atan2_16::xd#10, atan2_16::@14/atan2_16::xd#1 ) [103] atan2_16::shift#2 = phi( atan2_16::@11/atan2_16::shift#5, atan2_16::@14/atan2_16::shift#1 ) [104] if(atan2_16::shift#2>=2) goto atan2_16::@14 to:atan2_16::@15 atan2_16::@15: scope:[atan2_16] from atan2_16::@13 [105] if(0==atan2_16::shift#2) goto atan2_16::@17 to:atan2_16::@16 atan2_16::@16: scope:[atan2_16] from atan2_16::@15 [106] atan2_16::xd#2 = atan2_16::xd#3 >> 1 [107] atan2_16::yd#2 = atan2_16::yd#3 >> 1 to:atan2_16::@17 atan2_16::@17: scope:[atan2_16] from atan2_16::@15 atan2_16::@16 [108] atan2_16::xd#5 = phi( atan2_16::@15/atan2_16::xd#3, atan2_16::@16/atan2_16::xd#2 ) [108] atan2_16::yd#5 = phi( atan2_16::@15/atan2_16::yd#3, atan2_16::@16/atan2_16::yd#2 ) [109] if(atan2_16::yi#3>=0) goto atan2_16::@18 to:atan2_16::@20 atan2_16::@20: scope:[atan2_16] from atan2_16::@17 [110] atan2_16::xi#2 = atan2_16::xi#3 - atan2_16::yd#5 [111] atan2_16::yi#2 = atan2_16::yi#3 + atan2_16::xd#5 [112] atan2_16::$23 = atan2_16::i#2 << 1 [113] atan2_16::angle#3 = atan2_16::angle#12 - CORDIC_ATAN2_ANGLES_16[atan2_16::$23] to:atan2_16::@19 atan2_16::@19: scope:[atan2_16] from atan2_16::@18 atan2_16::@20 [114] atan2_16::xi#8 = phi( atan2_16::@18/atan2_16::xi#1, atan2_16::@20/atan2_16::xi#2 ) [114] atan2_16::angle#13 = phi( atan2_16::@18/atan2_16::angle#2, atan2_16::@20/atan2_16::angle#3 ) [114] atan2_16::yi#8 = phi( atan2_16::@18/atan2_16::yi#1, atan2_16::@20/atan2_16::yi#2 ) [115] atan2_16::i#1 = ++ atan2_16::i#2 [116] if(atan2_16::i#1==CORDIC_ITERATIONS_16-1+1) goto atan2_16::@12 to:atan2_16::@10 atan2_16::@18: scope:[atan2_16] from atan2_16::@17 [117] atan2_16::xi#1 = atan2_16::xi#3 + atan2_16::yd#5 [118] atan2_16::yi#1 = atan2_16::yi#3 - atan2_16::xd#5 [119] atan2_16::$22 = atan2_16::i#2 << 1 [120] atan2_16::angle#2 = atan2_16::angle#12 + CORDIC_ATAN2_ANGLES_16[atan2_16::$22] to:atan2_16::@19 atan2_16::@14: scope:[atan2_16] from atan2_16::@13 [121] atan2_16::xd#1 = atan2_16::xd#3 >> 2 [122] atan2_16::yd#1 = atan2_16::yd#3 >> 2 [123] atan2_16::shift#1 = atan2_16::shift#2 - 2 to:atan2_16::@13 atan2_16::@4: scope:[atan2_16] from atan2_16::@3 [124] atan2_16::xi#13 = atan2_16::x#0 to:atan2_16::@6 atan2_16::@1: scope:[atan2_16] from atan2_16 [125] atan2_16::yi#16 = atan2_16::y#0 to:atan2_16::@3 void print_uint_at(word print_uint_at::w , byte* print_uint_at::at) print_uint_at: scope:[print_uint_at] from print_ulong_at print_ulong_at::@1 [126] print_uint_at::at#2 = phi( print_ulong_at/main::BASE_SCREEN, print_ulong_at::@1/main::BASE_SCREEN+4 ) [126] print_uint_at::w#2 = phi( print_ulong_at/print_uint_at::w#0, print_ulong_at::@1/print_uint_at::w#1 ) [127] print_uchar_at::b#0 = > print_uint_at::w#2 [128] print_uchar_at::at#0 = print_uint_at::at#2 [129] call print_uchar_at to:print_uint_at::@1 print_uint_at::@1: scope:[print_uint_at] from print_uint_at [130] print_uchar_at::b#1 = < print_uint_at::w#2 [131] print_uchar_at::at#1 = print_uint_at::at#2 + 2 [132] call print_uchar_at to:print_uint_at::@return print_uint_at::@return: scope:[print_uint_at] from print_uint_at::@1 [133] return to:@return void print_uchar_at(byte print_uchar_at::b , byte* print_uchar_at::at) print_uchar_at: scope:[print_uchar_at] from print_uint_at print_uint_at::@1 [134] print_uchar_at::at#2 = phi( print_uint_at/print_uchar_at::at#0, print_uint_at::@1/print_uchar_at::at#1 ) [134] print_uchar_at::b#2 = phi( print_uint_at/print_uchar_at::b#0, print_uint_at::@1/print_uchar_at::b#1 ) [135] print_uchar_at::$0 = print_uchar_at::b#2 >> 4 [136] print_char_at::ch#0 = print_hextab[print_uchar_at::$0] [137] print_char_at::at#0 = print_uchar_at::at#2 [138] call print_char_at to:print_uchar_at::@1 print_uchar_at::@1: scope:[print_uchar_at] from print_uchar_at [139] print_uchar_at::$2 = print_uchar_at::b#2 & $f [140] print_char_at::at#1 = print_uchar_at::at#2 + 1 [141] print_char_at::ch#1 = print_hextab[print_uchar_at::$2] [142] call print_char_at to:print_uchar_at::@return print_uchar_at::@return: scope:[print_uchar_at] from print_uchar_at::@1 [143] return to:@return void print_char_at(byte print_char_at::ch , byte* print_char_at::at) print_char_at: scope:[print_char_at] from print_uchar_at print_uchar_at::@1 [144] print_char_at::at#2 = phi( print_uchar_at/print_char_at::at#0, print_uchar_at::@1/print_char_at::at#1 ) [144] print_char_at::ch#2 = phi( print_uchar_at/print_char_at::ch#0, print_uchar_at::@1/print_char_at::ch#1 ) [145] *print_char_at::at#2 = print_char_at::ch#2 to:print_char_at::@return print_char_at::@return: scope:[print_char_at] from print_char_at [146] return to:@return VARIABLE REGISTER WEIGHTS word atan2_16(signed word atan2_16::x , signed word atan2_16::y) signed word~ atan2_16::$2 20002.0 byte~ atan2_16::$22 2.0000002E7 byte~ atan2_16::$23 2.0000002E7 signed word~ atan2_16::$7 20002.0 word atan2_16::angle word atan2_16::angle#1 15001.5 word atan2_16::angle#11 20002.0 word atan2_16::angle#12 1904762.0952380951 word atan2_16::angle#13 1.3333334666666666E7 word atan2_16::angle#2 2.0000002E7 word atan2_16::angle#3 2.0000002E7 word atan2_16::angle#4 20002.0 word atan2_16::angle#5 20002.0 word atan2_16::angle#6 2.0010003E7 byte atan2_16::i byte atan2_16::i#1 1.50000015E7 byte atan2_16::i#2 2083333.5416666665 word atan2_16::return word atan2_16::return#0 7001.0 word atan2_16::return#2 2002.0 byte atan2_16::shift byte atan2_16::shift#1 2.00000002E8 byte atan2_16::shift#2 8.000000125E7 byte atan2_16::shift#5 6666667.333333333 signed word atan2_16::x signed word atan2_16::x#0 1079.078947368421 signed word atan2_16::xd signed word atan2_16::xd#1 6.6666667333333336E7 signed word atan2_16::xd#10 1.0000001E7 signed word atan2_16::xd#2 1.0000001E7 signed word atan2_16::xd#3 7.666666833333333E7 signed word atan2_16::xd#5 1.0000001E7 signed word atan2_16::xi signed word atan2_16::xi#0 30003.0 signed word atan2_16::xi#1 5000000.5 signed word atan2_16::xi#13 20002.0 signed word atan2_16::xi#2 5000000.5 signed word atan2_16::xi#3 2667333.6666666665 signed word atan2_16::xi#8 1.0000001E7 signed word atan2_16::y signed word atan2_16::y#0 1025.125 signed word atan2_16::yd signed word atan2_16::yd#1 1.00000001E8 signed word atan2_16::yd#10 2.0000002E7 signed word atan2_16::yd#2 2.0000002E7 signed word atan2_16::yd#3 4.6000001E7 signed word atan2_16::yd#5 2.0000002E7 signed word atan2_16::yi signed word atan2_16::yi#0 6000.6 signed word atan2_16::yi#1 6666667.333333333 signed word atan2_16::yi#16 20002.0 signed word atan2_16::yi#2 6666667.333333333 signed word atan2_16::yi#3 3530000.4117647056 signed word atan2_16::yi#8 1.0000001E7 dword clock() dword clock::return dword clock::return#0 4.333333333333333 dword clock::return#2 4.0 void clock_start() void init_angle_screen(byte* init_angle_screen::screen) byte~ init_angle_screen::$10 2002.0 byte~ init_angle_screen::$11 2002.0 byte~ init_angle_screen::$3 2002.0 byte~ init_angle_screen::$4 2002.0 byte~ init_angle_screen::$5 2002.0 word~ init_angle_screen::$7 2002.0 byte~ init_angle_screen::$9 2002.0 byte init_angle_screen::ang_w byte init_angle_screen::ang_w#0 834.1666666666667 word init_angle_screen::angle_w word init_angle_screen::angle_w#0 2002.0 byte* init_angle_screen::screen byte* init_angle_screen::screen_bottomline byte* init_angle_screen::screen_bottomline#1 67.33333333333333 byte* init_angle_screen::screen_bottomline#6 88.16 byte* init_angle_screen::screen_topline byte* init_angle_screen::screen_topline#1 50.5 byte* init_angle_screen::screen_topline#6 91.83333333333334 byte init_angle_screen::x byte init_angle_screen::x#1 1001.0 byte init_angle_screen::x#2 286.0 byte init_angle_screen::xb byte init_angle_screen::xb#1 2002.0 byte init_angle_screen::xb#2 182.0 signed word init_angle_screen::xw word init_angle_screen::xw#0 333.6666666666667 byte init_angle_screen::y byte init_angle_screen::y#1 151.5 byte init_angle_screen::y#5 46.26923076923077 signed word init_angle_screen::yw word init_angle_screen::yw#0 500.5 void init_font_hex(byte* init_font_hex::charset) byte~ init_font_hex::$0 10001.0 byte~ init_font_hex::$1 20002.0 byte~ init_font_hex::$2 20002.0 byte init_font_hex::c byte init_font_hex::c#1 151.5 byte init_font_hex::c#6 10.631578947368421 byte init_font_hex::c1 byte init_font_hex::c1#1 1501.5 byte init_font_hex::c1#4 133.46666666666667 byte* init_font_hex::charset byte* init_font_hex::charset#0 350.5 byte* init_font_hex::charset#2 1079.0714285714287 byte* init_font_hex::charset#5 202.0 byte init_font_hex::i byte init_font_hex::i#1 15001.5 byte init_font_hex::i#2 6667.333333333333 byte init_font_hex::idx byte init_font_hex::idx#2 5501.0 byte init_font_hex::idx#3 2002.0 byte init_font_hex::idx#5 6000.6 byte* init_font_hex::proto_hi byte* init_font_hex::proto_hi#1 67.33333333333333 byte* init_font_hex::proto_hi#6 566.8333333333333 byte* init_font_hex::proto_lo byte* init_font_hex::proto_lo#1 500.5 byte* init_font_hex::proto_lo#4 923.3076923076923 void main() dword~ main::$4 4.0 dword main::cyclecount dword main::cyclecount#0 4.0 byte* main::toD0181_gfx byte main::toD0181_return byte* main::toD0181_screen byte* main::toD0182_gfx byte main::toD0182_return byte* main::toD0182_screen void print_char_at(byte print_char_at::ch , byte* print_char_at::at) byte* print_char_at::at byte* print_char_at::at#0 2002.0 byte* print_char_at::at#1 1001.0 byte* print_char_at::at#2 12003.0 byte print_char_at::ch byte print_char_at::ch#0 1001.0 byte print_char_at::ch#1 2002.0 byte print_char_at::ch#2 12003.0 void print_uchar_at(byte print_uchar_at::b , byte* print_uchar_at::at) byte~ print_uchar_at::$0 2002.0 byte~ print_uchar_at::$2 1001.0 byte* print_uchar_at::at byte* print_uchar_at::at#0 202.0 byte* print_uchar_at::at#1 202.0 byte* print_uchar_at::at#2 367.33333333333337 byte print_uchar_at::b byte print_uchar_at::b#0 101.0 byte print_uchar_at::b#1 101.0 byte print_uchar_at::b#2 440.79999999999995 void print_uint_at(word print_uint_at::w , byte* print_uint_at::at) byte* print_uint_at::at byte* print_uint_at::at#2 40.4 word print_uint_at::w word print_uint_at::w#0 22.0 word print_uint_at::w#1 22.0 word print_uint_at::w#2 56.0 void print_ulong_at(dword print_ulong_at::dw , byte* print_ulong_at::at) byte* print_ulong_at::at dword print_ulong_at::dw dword print_ulong_at::dw#0 8.0 Initial phi equivalence classes [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] [ init_font_hex::c#6 init_font_hex::c#1 ] [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] [ init_font_hex::c1#4 init_font_hex::c1#1 ] [ init_font_hex::i#2 init_font_hex::i#1 ] [ init_font_hex::idx#5 init_font_hex::idx#2 ] [ init_angle_screen::y#5 init_angle_screen::y#1 ] [ init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#1 ] [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#1 ] [ init_angle_screen::x#2 init_angle_screen::x#1 ] [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] [ atan2_16::i#2 atan2_16::i#1 ] [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] [ atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ] [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] [ print_uint_at::w#2 print_uint_at::w#0 print_uint_at::w#1 ] [ print_uint_at::at#2 ] [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ] [ print_uchar_at::at#2 print_uchar_at::at#0 print_uchar_at::at#1 ] [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] Added variable clock::return#2 to live range equivalence class [ clock::return#2 ] Added variable main::$4 to live range equivalence class [ main::$4 ] Added variable main::cyclecount#0 to live range equivalence class [ main::cyclecount#0 ] Added variable print_ulong_at::dw#0 to live range equivalence class [ print_ulong_at::dw#0 ] Added variable init_font_hex::$0 to live range equivalence class [ init_font_hex::$0 ] Added variable init_font_hex::$1 to live range equivalence class [ init_font_hex::$1 ] Added variable init_font_hex::$2 to live range equivalence class [ init_font_hex::$2 ] Added variable init_font_hex::idx#3 to live range equivalence class [ init_font_hex::idx#3 ] Added variable init_angle_screen::$3 to live range equivalence class [ init_angle_screen::$3 ] Added variable init_angle_screen::$4 to live range equivalence class [ init_angle_screen::$4 ] Added variable init_angle_screen::xw#0 to live range equivalence class [ init_angle_screen::xw#0 ] Added variable init_angle_screen::$5 to live range equivalence class [ init_angle_screen::$5 ] Added variable init_angle_screen::yw#0 to live range equivalence class [ init_angle_screen::yw#0 ] Added variable atan2_16::x#0 to live range equivalence class [ atan2_16::x#0 ] Added variable atan2_16::y#0 to live range equivalence class [ atan2_16::y#0 ] Added variable atan2_16::return#2 to live range equivalence class [ atan2_16::return#2 ] Added variable init_angle_screen::angle_w#0 to live range equivalence class [ init_angle_screen::angle_w#0 ] Added variable init_angle_screen::$7 to live range equivalence class [ init_angle_screen::$7 ] Added variable init_angle_screen::ang_w#0 to live range equivalence class [ init_angle_screen::ang_w#0 ] Added variable init_angle_screen::$9 to live range equivalence class [ init_angle_screen::$9 ] Added variable init_angle_screen::$10 to live range equivalence class [ init_angle_screen::$10 ] Added variable init_angle_screen::$11 to live range equivalence class [ init_angle_screen::$11 ] Added variable clock::return#0 to live range equivalence class [ clock::return#0 ] Added variable atan2_16::$23 to live range equivalence class [ atan2_16::$23 ] Added variable atan2_16::$22 to live range equivalence class [ atan2_16::$22 ] Added variable print_uchar_at::$0 to live range equivalence class [ print_uchar_at::$0 ] Added variable print_uchar_at::$2 to live range equivalence class [ print_uchar_at::$2 ] Complete equivalence classes [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] [ init_font_hex::c#6 init_font_hex::c#1 ] [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] [ init_font_hex::c1#4 init_font_hex::c1#1 ] [ init_font_hex::i#2 init_font_hex::i#1 ] [ init_font_hex::idx#5 init_font_hex::idx#2 ] [ init_angle_screen::y#5 init_angle_screen::y#1 ] [ init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#1 ] [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#1 ] [ init_angle_screen::x#2 init_angle_screen::x#1 ] [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] [ atan2_16::i#2 atan2_16::i#1 ] [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] [ atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ] [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] [ print_uint_at::w#2 print_uint_at::w#0 print_uint_at::w#1 ] [ print_uint_at::at#2 ] [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ] [ print_uchar_at::at#2 print_uchar_at::at#0 print_uchar_at::at#1 ] [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] [ clock::return#2 ] [ main::$4 ] [ main::cyclecount#0 ] [ print_ulong_at::dw#0 ] [ init_font_hex::$0 ] [ init_font_hex::$1 ] [ init_font_hex::$2 ] [ init_font_hex::idx#3 ] [ init_angle_screen::$3 ] [ init_angle_screen::$4 ] [ init_angle_screen::xw#0 ] [ init_angle_screen::$5 ] [ init_angle_screen::yw#0 ] [ atan2_16::x#0 ] [ atan2_16::y#0 ] [ atan2_16::return#2 ] [ init_angle_screen::angle_w#0 ] [ init_angle_screen::$7 ] [ init_angle_screen::ang_w#0 ] [ init_angle_screen::$9 ] [ init_angle_screen::$10 ] [ init_angle_screen::$11 ] [ clock::return#0 ] [ atan2_16::$23 ] [ atan2_16::$22 ] [ print_uchar_at::$0 ] [ print_uchar_at::$2 ] Allocated zp[2]:2 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] Allocated zp[1]:4 [ init_font_hex::c#6 init_font_hex::c#1 ] Allocated zp[2]:5 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] Allocated zp[2]:7 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] Allocated zp[1]:9 [ init_font_hex::c1#4 init_font_hex::c1#1 ] Allocated zp[1]:10 [ init_font_hex::i#2 init_font_hex::i#1 ] Allocated zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ] Allocated zp[1]:12 [ init_angle_screen::y#5 init_angle_screen::y#1 ] Allocated zp[2]:13 [ init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#1 ] Allocated zp[2]:15 [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#1 ] Allocated zp[1]:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] Allocated zp[1]:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] Allocated zp[2]:19 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] Allocated zp[2]:21 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] Allocated zp[1]:23 [ atan2_16::i#2 atan2_16::i#1 ] Allocated zp[2]:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] Allocated zp[2]:26 [ atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ] Allocated zp[1]:28 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] Allocated zp[2]:29 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] Allocated zp[2]:31 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] Allocated zp[2]:33 [ print_uint_at::w#2 print_uint_at::w#0 print_uint_at::w#1 ] Allocated zp[2]:35 [ print_uint_at::at#2 ] Allocated zp[1]:37 [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ] Allocated zp[2]:38 [ print_uchar_at::at#2 print_uchar_at::at#0 print_uchar_at::at#1 ] Allocated zp[1]:40 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] Allocated zp[2]:41 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] Allocated zp[4]:43 [ clock::return#2 ] Allocated zp[4]:47 [ main::$4 ] Allocated zp[4]:51 [ main::cyclecount#0 ] Allocated zp[4]:55 [ print_ulong_at::dw#0 ] Allocated zp[1]:59 [ init_font_hex::$0 ] Allocated zp[1]:60 [ init_font_hex::$1 ] Allocated zp[1]:61 [ init_font_hex::$2 ] Allocated zp[1]:62 [ init_font_hex::idx#3 ] Allocated zp[1]:63 [ init_angle_screen::$3 ] Allocated zp[1]:64 [ init_angle_screen::$4 ] Allocated zp[2]:65 [ init_angle_screen::xw#0 ] Allocated zp[1]:67 [ init_angle_screen::$5 ] Allocated zp[2]:68 [ init_angle_screen::yw#0 ] Allocated zp[2]:70 [ atan2_16::x#0 ] Allocated zp[2]:72 [ atan2_16::y#0 ] Allocated zp[2]:74 [ atan2_16::return#2 ] Allocated zp[2]:76 [ init_angle_screen::angle_w#0 ] Allocated zp[2]:78 [ init_angle_screen::$7 ] Allocated zp[1]:80 [ init_angle_screen::ang_w#0 ] Allocated zp[1]:81 [ init_angle_screen::$9 ] Allocated zp[1]:82 [ init_angle_screen::$10 ] Allocated zp[1]:83 [ init_angle_screen::$11 ] Allocated zp[4]:84 [ clock::return#0 ] Allocated zp[1]:88 [ atan2_16::$23 ] Allocated zp[1]:89 [ atan2_16::$22 ] Allocated zp[1]:90 [ print_uchar_at::$0 ] Allocated zp[1]:91 [ print_uchar_at::$2 ] REGISTER UPLIFT POTENTIAL REGISTERS Statement [3] *D018 = main::toD0181_return#0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [9] clock::return#2 = clock::return#0 [ clock::return#2 ] ( [ clock::return#2 ] { { clock::return#0 = clock::return#2 } } ) always clobbers reg byte a Statement [10] main::$4 = clock::return#2 [ main::$4 ] ( [ main::$4 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } } ) always clobbers reg byte a Statement [11] main::cyclecount#0 = main::$4 - CLOCKS_PER_INIT [ main::cyclecount#0 ] ( [ main::cyclecount#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } } ) always clobbers reg byte a Statement [12] print_ulong_at::dw#0 = main::cyclecount#0 [ print_ulong_at::dw#0 ] ( [ print_ulong_at::dw#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } } ) always clobbers reg byte a Statement [15] *D018 = main::toD0182_return#0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [20] *init_font_hex::charset#2 = 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] { } ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte a as potential for zp[1]:4 [ init_font_hex::c#6 init_font_hex::c#1 ] Removing always clobbered register reg byte y as potential for zp[1]:4 [ init_font_hex::c#6 init_font_hex::c#1 ] Removing always clobbered register reg byte a as potential for zp[1]:9 [ init_font_hex::c1#4 init_font_hex::c1#1 ] Removing always clobbered register reg byte y as potential for zp[1]:9 [ init_font_hex::c1#4 init_font_hex::c1#1 ] Statement [22] init_font_hex::$0 = init_font_hex::proto_hi#6[init_font_hex::i#2] << 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:10 [ init_font_hex::i#2 init_font_hex::i#1 ] Removing always clobbered register reg byte a as potential for zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ] Statement [23] init_font_hex::$1 = init_font_hex::proto_lo#4[init_font_hex::i#2] << 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:59 [ init_font_hex::$0 ] Statement [29] init_font_hex::charset#2[init_font_hex::idx#2] = 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] { } ) always clobbers reg byte a Statement [31] init_font_hex::charset#2[init_font_hex::idx#3] = 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] { } ) always clobbers reg byte a Statement [32] init_font_hex::proto_lo#1 = init_font_hex::proto_lo#4 + 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] { } ) always clobbers reg byte a Statement [33] init_font_hex::charset#0 = init_font_hex::charset#2 + 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] { } ) always clobbers reg byte a Statement [36] init_font_hex::proto_hi#1 = init_font_hex::proto_hi#6 + 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( init_font_hex:1 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] { } ) always clobbers reg byte a Statement [40] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = 0 [ ] ( clock_start:4 [ ] { } ) always clobbers reg byte a Statement [41] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A [ ] ( clock_start:4 [ ] { } ) always clobbers reg byte a Statement [42] *CIA2_TIMER_AB = $ffffffff [ ] ( clock_start:4 [ ] { } ) always clobbers reg byte a Statement [43] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A [ ] ( clock_start:4 [ ] { } ) always clobbers reg byte a Statement [44] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = CIA_TIMER_CONTROL_START [ ] ( clock_start:4 [ ] { } ) always clobbers reg byte a Statement [50] init_angle_screen::screen_topline#1 = init_angle_screen::screen_topline#6 - $28 [ init_angle_screen::y#5 init_angle_screen::screen_bottomline#6 init_angle_screen::screen_topline#1 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_bottomline#6 init_angle_screen::screen_topline#1 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:12 [ init_angle_screen::y#5 init_angle_screen::y#1 ] Statement [51] init_angle_screen::screen_bottomline#1 = init_angle_screen::screen_bottomline#6 + $28 [ init_angle_screen::y#5 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] { } ) always clobbers reg byte a Statement [55] init_angle_screen::$3 = init_angle_screen::x#2 << 1 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] Removing always clobbered register reg byte a as potential for zp[1]:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] Statement [56] init_angle_screen::$4 = $27 - init_angle_screen::$3 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$4 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$4 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [58] init_angle_screen::$5 = init_angle_screen::y#5 << 1 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$5 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$5 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [60] atan2_16::x#0 = (signed word)init_angle_screen::xw#0 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [61] atan2_16::y#0 = (signed word)init_angle_screen::yw#0 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [63] atan2_16::return#2 = atan2_16::return#0 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [64] init_angle_screen::angle_w#0 = atan2_16::return#2 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] { } ) always clobbers reg byte a Statement [65] init_angle_screen::$7 = init_angle_screen::angle_w#0 + $80 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$7 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$7 ] { } ) always clobbers reg byte a Statement [68] init_angle_screen::$9 = - init_angle_screen::ang_w#0 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$9 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$9 ] { } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:80 [ init_angle_screen::ang_w#0 ] Statement [70] init_angle_screen::$10 = $80 + init_angle_screen::ang_w#0 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$10 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$10 ] { } ) always clobbers reg byte a Statement [72] init_angle_screen::$11 = $80 - init_angle_screen::ang_w#0 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$11 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$11 ] { } ) always clobbers reg byte a Statement [76] clock::return#0 = $ffffffff - *CIA2_TIMER_AB [ clock::return#0 ] ( clock:8 [ clock::return#0 ] { { clock::return#0 = clock::return#2 } } ) always clobbers reg byte a Statement [78] print_uint_at::w#0 = > print_ulong_at::dw#0 [ print_ulong_at::dw#0 print_uint_at::w#0 ] ( print_ulong_at:13 [ print_ulong_at::dw#0 print_uint_at::w#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } } ) always clobbers reg byte a Statement [80] print_uint_at::w#1 = < print_ulong_at::dw#0 [ print_uint_at::w#1 ] ( print_ulong_at:13 [ print_uint_at::w#1 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } } ) always clobbers reg byte a Statement [83] if(atan2_16::y#0>=0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [84] atan2_16::$2 = - atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [86] if(atan2_16::x#0>=0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [87] atan2_16::$7 = - atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [90] if(atan2_16::yi#3!=0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:23 [ atan2_16::i#2 atan2_16::i#1 ] Statement [92] atan2_16::angle#1 = atan2_16::angle#6 >> 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [93] if(atan2_16::x#0>=0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#1 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [94] atan2_16::angle#4 = $8000 - atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#4 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [96] if(atan2_16::y#0>=0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#11 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [97] atan2_16::angle#5 = - atan2_16::angle#11 [ atan2_16::angle#5 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#5 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [101] atan2_16::xd#10 = atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:28 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] Statement [102] atan2_16::yd#10 = atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [106] atan2_16::xd#2 = atan2_16::xd#3 >> 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [107] atan2_16::yd#2 = atan2_16::yd#3 >> 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [109] if(atan2_16::yi#3>=0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [110] atan2_16::xi#2 = atan2_16::xi#3 - atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [111] atan2_16::yi#2 = atan2_16::yi#3 + atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [112] atan2_16::$23 = atan2_16::i#2 << 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$23 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$23 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [113] atan2_16::angle#3 = atan2_16::angle#12 - CORDIC_ATAN2_ANGLES_16[atan2_16::$23] [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [117] atan2_16::xi#1 = atan2_16::xi#3 + atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [118] atan2_16::yi#1 = atan2_16::yi#3 - atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [119] atan2_16::$22 = atan2_16::i#2 << 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$22 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$22 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [120] atan2_16::angle#2 = atan2_16::angle#12 + CORDIC_ATAN2_ANGLES_16[atan2_16::$22] [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [121] atan2_16::xd#1 = atan2_16::xd#3 >> 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [122] atan2_16::yd#1 = atan2_16::yd#3 >> 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [124] atan2_16::xi#13 = atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [125] atan2_16::yi#16 = atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [128] print_uchar_at::at#0 = print_uint_at::at#2 [ print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#0 print_uchar_at::at#0 ] ( print_ulong_at:13::print_uint_at:79 [ print_ulong_at::dw#0 print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#0 print_uchar_at::at#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } } print_ulong_at:13::print_uint_at:81 [ print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#0 print_uchar_at::at#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:37 [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ] Statement [131] print_uchar_at::at#1 = print_uint_at::at#2 + 2 [ print_uchar_at::b#1 print_uchar_at::at#1 ] ( print_ulong_at:13::print_uint_at:79 [ print_ulong_at::dw#0 print_uchar_at::b#1 print_uchar_at::at#1 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } } print_ulong_at:13::print_uint_at:81 [ print_uchar_at::b#1 print_uchar_at::at#1 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } } ) always clobbers reg byte a Statement [135] print_uchar_at::$0 = print_uchar_at::b#2 >> 4 [ print_uchar_at::b#2 print_uchar_at::at#2 print_uchar_at::$0 ] ( print_ulong_at:13::print_uint_at:79::print_uchar_at:129 [ print_ulong_at::dw#0 print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#2 print_uchar_at::at#2 print_uchar_at::$0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uint_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:129 [ print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#2 print_uchar_at::at#2 print_uchar_at::$0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uint_at::at#2 } } print_ulong_at:13::print_uint_at:79::print_uchar_at:132 [ print_ulong_at::dw#0 print_uchar_at::b#2 print_uchar_at::at#2 print_uchar_at::$0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#1 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:132 [ print_uchar_at::b#2 print_uchar_at::at#2 print_uchar_at::$0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#1 } } ) always clobbers reg byte a Statement [137] print_char_at::at#0 = print_uchar_at::at#2 [ print_uchar_at::b#2 print_uchar_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] ( print_ulong_at:13::print_uint_at:79::print_uchar_at:129 [ print_ulong_at::dw#0 print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#2 print_uchar_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uint_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:129 [ print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#2 print_uchar_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uint_at::at#2 } } print_ulong_at:13::print_uint_at:79::print_uchar_at:132 [ print_ulong_at::dw#0 print_uchar_at::b#2 print_uchar_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#1 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:132 [ print_uchar_at::b#2 print_uchar_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#1 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:40 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] Statement [139] print_uchar_at::$2 = print_uchar_at::b#2 & $f [ print_uchar_at::at#2 print_uchar_at::$2 ] ( print_ulong_at:13::print_uint_at:79::print_uchar_at:129 [ print_ulong_at::dw#0 print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::at#2 print_uchar_at::$2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:129 [ print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::at#2 print_uchar_at::$2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:79::print_uchar_at:132 [ print_ulong_at::dw#0 print_uchar_at::at#2 print_uchar_at::$2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:132 [ print_uchar_at::at#2 print_uchar_at::$2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } ) always clobbers reg byte a Statement [140] print_char_at::at#1 = print_uchar_at::at#2 + 1 [ print_uchar_at::$2 print_char_at::at#1 ] ( print_ulong_at:13::print_uint_at:79::print_uchar_at:129 [ print_ulong_at::dw#0 print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::$2 print_char_at::at#1 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:129 [ print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::$2 print_char_at::at#1 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:79::print_uchar_at:132 [ print_ulong_at::dw#0 print_uchar_at::$2 print_char_at::at#1 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:132 [ print_uchar_at::$2 print_char_at::at#1 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } ) always clobbers reg byte a Removing always clobbered register reg byte a as potential for zp[1]:91 [ print_uchar_at::$2 ] Statement [145] *print_char_at::at#2 = print_char_at::ch#2 [ ] ( print_ulong_at:13::print_uint_at:79::print_uchar_at:129::print_char_at:138 [ print_ulong_at::dw#0 print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#2 print_uchar_at::at#2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uint_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:129::print_char_at:138 [ print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#2 print_uchar_at::at#2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uint_at::at#2 } } print_ulong_at:13::print_uint_at:79::print_uchar_at:132::print_char_at:138 [ print_ulong_at::dw#0 print_uchar_at::b#2 print_uchar_at::at#2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#1 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:132::print_char_at:138 [ print_uchar_at::b#2 print_uchar_at::at#2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#1 } } print_ulong_at:13::print_uint_at:79::print_uchar_at:129::print_char_at:142 [ print_ulong_at::dw#0 print_uint_at::w#2 print_uint_at::at#2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:129::print_char_at:142 [ print_uint_at::w#2 print_uint_at::at#2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:79::print_uchar_at:132::print_char_at:142 [ print_ulong_at::dw#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:132::print_char_at:142 [ ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } ) always clobbers reg byte a reg byte y Removing always clobbered register reg byte y as potential for zp[1]:37 [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ] Statement [3] *D018 = main::toD0181_return#0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [9] clock::return#2 = clock::return#0 [ clock::return#2 ] ( [ clock::return#2 ] { { clock::return#0 = clock::return#2 } } ) always clobbers reg byte a Statement [10] main::$4 = clock::return#2 [ main::$4 ] ( [ main::$4 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } } ) always clobbers reg byte a Statement [11] main::cyclecount#0 = main::$4 - CLOCKS_PER_INIT [ main::cyclecount#0 ] ( [ main::cyclecount#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } } ) always clobbers reg byte a Statement [12] print_ulong_at::dw#0 = main::cyclecount#0 [ print_ulong_at::dw#0 ] ( [ print_ulong_at::dw#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } } ) always clobbers reg byte a Statement [15] *D018 = main::toD0182_return#0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [20] *init_font_hex::charset#2 = 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] { } ) always clobbers reg byte a reg byte y Statement [22] init_font_hex::$0 = init_font_hex::proto_hi#6[init_font_hex::i#2] << 4 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 ] { } ) always clobbers reg byte a Statement [23] init_font_hex::$1 = init_font_hex::proto_lo#4[init_font_hex::i#2] << 1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::i#2 init_font_hex::idx#5 init_font_hex::$0 init_font_hex::$1 ] { } ) always clobbers reg byte a Statement [29] init_font_hex::charset#2[init_font_hex::idx#2] = 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 init_font_hex::idx#2 ] { } ) always clobbers reg byte a Statement [31] init_font_hex::charset#2[init_font_hex::idx#3] = 0 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::proto_lo#4 init_font_hex::c1#4 ] { } ) always clobbers reg byte a Statement [32] init_font_hex::proto_lo#1 = init_font_hex::proto_lo#4 + 5 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#2 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] { } ) always clobbers reg byte a Statement [33] init_font_hex::charset#0 = init_font_hex::charset#2 + 8 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] ( init_font_hex:1 [ init_font_hex::proto_hi#6 init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::c1#4 init_font_hex::proto_lo#1 ] { } ) always clobbers reg byte a Statement [36] init_font_hex::proto_hi#1 = init_font_hex::proto_hi#6 + 5 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] ( init_font_hex:1 [ init_font_hex::c#6 init_font_hex::charset#0 init_font_hex::proto_hi#1 ] { } ) always clobbers reg byte a Statement [40] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = 0 [ ] ( clock_start:4 [ ] { } ) always clobbers reg byte a Statement [41] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A [ ] ( clock_start:4 [ ] { } ) always clobbers reg byte a Statement [42] *CIA2_TIMER_AB = $ffffffff [ ] ( clock_start:4 [ ] { } ) always clobbers reg byte a Statement [43] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A [ ] ( clock_start:4 [ ] { } ) always clobbers reg byte a Statement [44] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = CIA_TIMER_CONTROL_START [ ] ( clock_start:4 [ ] { } ) always clobbers reg byte a Statement [50] init_angle_screen::screen_topline#1 = init_angle_screen::screen_topline#6 - $28 [ init_angle_screen::y#5 init_angle_screen::screen_bottomline#6 init_angle_screen::screen_topline#1 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_bottomline#6 init_angle_screen::screen_topline#1 ] { } ) always clobbers reg byte a Statement [51] init_angle_screen::screen_bottomline#1 = init_angle_screen::screen_bottomline#6 + $28 [ init_angle_screen::y#5 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#1 init_angle_screen::screen_bottomline#1 ] { } ) always clobbers reg byte a Statement [55] init_angle_screen::$3 = init_angle_screen::x#2 << 1 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$3 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [56] init_angle_screen::$4 = $27 - init_angle_screen::$3 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$4 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$4 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [58] init_angle_screen::$5 = init_angle_screen::y#5 << 1 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$5 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::xw#0 init_angle_screen::$5 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [60] atan2_16::x#0 = (signed word)init_angle_screen::xw#0 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::yw#0 atan2_16::x#0 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [61] atan2_16::y#0 = (signed word)init_angle_screen::yw#0 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [63] atan2_16::return#2 = atan2_16::return#0 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::return#2 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [64] init_angle_screen::angle_w#0 = atan2_16::return#2 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::angle_w#0 ] { } ) always clobbers reg byte a Statement [65] init_angle_screen::$7 = init_angle_screen::angle_w#0 + $80 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$7 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$7 ] { } ) always clobbers reg byte a Statement [67] init_angle_screen::screen_bottomline#6[init_angle_screen::xb#2] = init_angle_screen::ang_w#0 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 ] { } ) always clobbers reg byte a Statement [68] init_angle_screen::$9 = - init_angle_screen::ang_w#0 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$9 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$9 ] { } ) always clobbers reg byte a Statement [70] init_angle_screen::$10 = $80 + init_angle_screen::ang_w#0 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$10 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::ang_w#0 init_angle_screen::$10 ] { } ) always clobbers reg byte a Statement [72] init_angle_screen::$11 = $80 - init_angle_screen::ang_w#0 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$11 ] ( init_angle_screen:6 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 init_angle_screen::$11 ] { } ) always clobbers reg byte a Statement [76] clock::return#0 = $ffffffff - *CIA2_TIMER_AB [ clock::return#0 ] ( clock:8 [ clock::return#0 ] { { clock::return#0 = clock::return#2 } } ) always clobbers reg byte a Statement [78] print_uint_at::w#0 = > print_ulong_at::dw#0 [ print_ulong_at::dw#0 print_uint_at::w#0 ] ( print_ulong_at:13 [ print_ulong_at::dw#0 print_uint_at::w#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } } ) always clobbers reg byte a Statement [80] print_uint_at::w#1 = < print_ulong_at::dw#0 [ print_uint_at::w#1 ] ( print_ulong_at:13 [ print_uint_at::w#1 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } } ) always clobbers reg byte a Statement [83] if(atan2_16::y#0>=0) goto atan2_16::@1 [ atan2_16::x#0 atan2_16::y#0 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [84] atan2_16::$2 = - atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::$2 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [86] if(atan2_16::x#0>=0) goto atan2_16::@4 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [87] atan2_16::$7 = - atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::$7 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [90] if(atan2_16::yi#3!=0) goto atan2_16::@11 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [92] atan2_16::angle#1 = atan2_16::angle#6 >> 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::angle#1 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [93] if(atan2_16::x#0>=0) goto atan2_16::@7 [ atan2_16::y#0 atan2_16::angle#1 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#1 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [94] atan2_16::angle#4 = $8000 - atan2_16::angle#1 [ atan2_16::y#0 atan2_16::angle#4 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::y#0 atan2_16::angle#4 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [96] if(atan2_16::y#0>=0) goto atan2_16::@8 [ atan2_16::angle#11 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#11 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [97] atan2_16::angle#5 = - atan2_16::angle#11 [ atan2_16::angle#5 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::angle#5 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [101] atan2_16::xd#10 = atan2_16::xi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [102] atan2_16::yd#10 = atan2_16::yi#3 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#5 atan2_16::xd#10 atan2_16::yd#10 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [106] atan2_16::xd#2 = atan2_16::xd#3 >> 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#3 atan2_16::xd#2 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [107] atan2_16::yd#2 = atan2_16::yd#3 >> 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#2 atan2_16::yd#2 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [109] if(atan2_16::yi#3>=0) goto atan2_16::@18 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::yd#5 atan2_16::xd#5 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [110] atan2_16::xi#2 = atan2_16::xi#3 - atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#2 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [111] atan2_16::yi#2 = atan2_16::yi#3 + atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [112] atan2_16::$23 = atan2_16::i#2 << 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$23 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::xi#2 atan2_16::yi#2 atan2_16::$23 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [113] atan2_16::angle#3 = atan2_16::angle#12 - CORDIC_ATAN2_ANGLES_16[atan2_16::$23] [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::xi#2 atan2_16::yi#2 atan2_16::angle#3 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [117] atan2_16::xi#1 = atan2_16::xi#3 + atan2_16::yd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::xd#5 atan2_16::xi#1 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [118] atan2_16::yi#1 = atan2_16::yi#3 - atan2_16::xd#5 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [119] atan2_16::$22 = atan2_16::i#2 << 1 [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$22 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::angle#12 atan2_16::yi#1 atan2_16::xi#1 atan2_16::$22 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [120] atan2_16::angle#2 = atan2_16::angle#12 + CORDIC_ATAN2_ANGLES_16[atan2_16::$22] [ atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::i#2 atan2_16::yi#1 atan2_16::angle#2 atan2_16::xi#1 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [121] atan2_16::xd#1 = atan2_16::xd#3 >> 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::yd#3 atan2_16::xd#1 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [122] atan2_16::yd#1 = atan2_16::yd#3 >> 2 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#3 atan2_16::xi#3 atan2_16::i#2 atan2_16::angle#12 atan2_16::shift#2 atan2_16::xd#1 atan2_16::yd#1 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [124] atan2_16::xi#13 = atan2_16::x#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#0 atan2_16::xi#13 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [125] atan2_16::yi#16 = atan2_16::y#0 [ atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] ( init_angle_screen:6::atan2_16:62 [ init_angle_screen::y#5 init_angle_screen::screen_topline#6 init_angle_screen::screen_bottomline#6 init_angle_screen::x#2 init_angle_screen::xb#2 atan2_16::x#0 atan2_16::y#0 atan2_16::yi#16 ] { { atan2_16::return#0 = atan2_16::return#2 } } ) always clobbers reg byte a Statement [128] print_uchar_at::at#0 = print_uint_at::at#2 [ print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#0 print_uchar_at::at#0 ] ( print_ulong_at:13::print_uint_at:79 [ print_ulong_at::dw#0 print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#0 print_uchar_at::at#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } } print_ulong_at:13::print_uint_at:81 [ print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#0 print_uchar_at::at#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } } ) always clobbers reg byte a Statement [131] print_uchar_at::at#1 = print_uint_at::at#2 + 2 [ print_uchar_at::b#1 print_uchar_at::at#1 ] ( print_ulong_at:13::print_uint_at:79 [ print_ulong_at::dw#0 print_uchar_at::b#1 print_uchar_at::at#1 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } } print_ulong_at:13::print_uint_at:81 [ print_uchar_at::b#1 print_uchar_at::at#1 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } } ) always clobbers reg byte a Statement [135] print_uchar_at::$0 = print_uchar_at::b#2 >> 4 [ print_uchar_at::b#2 print_uchar_at::at#2 print_uchar_at::$0 ] ( print_ulong_at:13::print_uint_at:79::print_uchar_at:129 [ print_ulong_at::dw#0 print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#2 print_uchar_at::at#2 print_uchar_at::$0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uint_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:129 [ print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#2 print_uchar_at::at#2 print_uchar_at::$0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uint_at::at#2 } } print_ulong_at:13::print_uint_at:79::print_uchar_at:132 [ print_ulong_at::dw#0 print_uchar_at::b#2 print_uchar_at::at#2 print_uchar_at::$0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#1 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:132 [ print_uchar_at::b#2 print_uchar_at::at#2 print_uchar_at::$0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#1 } } ) always clobbers reg byte a Statement [137] print_char_at::at#0 = print_uchar_at::at#2 [ print_uchar_at::b#2 print_uchar_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] ( print_ulong_at:13::print_uint_at:79::print_uchar_at:129 [ print_ulong_at::dw#0 print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#2 print_uchar_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uint_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:129 [ print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#2 print_uchar_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uint_at::at#2 } } print_ulong_at:13::print_uint_at:79::print_uchar_at:132 [ print_ulong_at::dw#0 print_uchar_at::b#2 print_uchar_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#1 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:132 [ print_uchar_at::b#2 print_uchar_at::at#2 print_char_at::ch#0 print_char_at::at#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#1 } } ) always clobbers reg byte a Statement [139] print_uchar_at::$2 = print_uchar_at::b#2 & $f [ print_uchar_at::at#2 print_uchar_at::$2 ] ( print_ulong_at:13::print_uint_at:79::print_uchar_at:129 [ print_ulong_at::dw#0 print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::at#2 print_uchar_at::$2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:129 [ print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::at#2 print_uchar_at::$2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:79::print_uchar_at:132 [ print_ulong_at::dw#0 print_uchar_at::at#2 print_uchar_at::$2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:132 [ print_uchar_at::at#2 print_uchar_at::$2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } ) always clobbers reg byte a Statement [140] print_char_at::at#1 = print_uchar_at::at#2 + 1 [ print_uchar_at::$2 print_char_at::at#1 ] ( print_ulong_at:13::print_uint_at:79::print_uchar_at:129 [ print_ulong_at::dw#0 print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::$2 print_char_at::at#1 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:129 [ print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::$2 print_char_at::at#1 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:79::print_uchar_at:132 [ print_ulong_at::dw#0 print_uchar_at::$2 print_char_at::at#1 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:132 [ print_uchar_at::$2 print_char_at::at#1 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } ) always clobbers reg byte a Statement [145] *print_char_at::at#2 = print_char_at::ch#2 [ ] ( print_ulong_at:13::print_uint_at:79::print_uchar_at:129::print_char_at:138 [ print_ulong_at::dw#0 print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#2 print_uchar_at::at#2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uint_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:129::print_char_at:138 [ print_uint_at::w#2 print_uint_at::at#2 print_uchar_at::b#2 print_uchar_at::at#2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uint_at::at#2 } } print_ulong_at:13::print_uint_at:79::print_uchar_at:132::print_char_at:138 [ print_ulong_at::dw#0 print_uchar_at::b#2 print_uchar_at::at#2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#1 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:132::print_char_at:138 [ print_uchar_at::b#2 print_uchar_at::at#2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_char_at::ch#0 = print_char_at::ch#2 } { print_char_at::at#0 = print_char_at::at#2 print_uchar_at::at#2 print_uchar_at::at#1 } } print_ulong_at:13::print_uint_at:79::print_uchar_at:129::print_char_at:142 [ print_ulong_at::dw#0 print_uint_at::w#2 print_uint_at::at#2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:129::print_char_at:142 [ print_uint_at::w#2 print_uint_at::at#2 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#0 = print_uchar_at::b#2 } { print_uchar_at::at#0 = print_uchar_at::at#2 print_uint_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:79::print_uchar_at:132::print_char_at:142 [ print_ulong_at::dw#0 ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#0 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } print_ulong_at:13::print_uint_at:81::print_uchar_at:132::print_char_at:142 [ ] { { print_ulong_at::dw#0 = main::cyclecount#0 } { print_uint_at::w#1 = print_uint_at::w#2 } { print_uchar_at::b#1 = print_uchar_at::b#2 } { print_uchar_at::at#1 = print_uchar_at::at#2 } { print_char_at::ch#1 = print_char_at::ch#2 } { print_char_at::at#1 = print_char_at::at#2 } } ) always clobbers reg byte a reg byte y Potential registers zp[2]:2 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] : zp[2]:2 , Potential registers zp[1]:4 [ init_font_hex::c#6 init_font_hex::c#1 ] : zp[1]:4 , reg byte x , Potential registers zp[2]:5 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] : zp[2]:5 , Potential registers zp[2]:7 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] : zp[2]:7 , Potential registers zp[1]:9 [ init_font_hex::c1#4 init_font_hex::c1#1 ] : zp[1]:9 , reg byte x , Potential registers zp[1]:10 [ init_font_hex::i#2 init_font_hex::i#1 ] : zp[1]:10 , reg byte x , reg byte y , Potential registers zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ] : zp[1]:11 , reg byte x , reg byte y , Potential registers zp[1]:12 [ init_angle_screen::y#5 init_angle_screen::y#1 ] : zp[1]:12 , reg byte x , reg byte y , Potential registers zp[2]:13 [ init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#1 ] : zp[2]:13 , Potential registers zp[2]:15 [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#1 ] : zp[2]:15 , Potential registers zp[1]:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] : zp[1]:17 , reg byte x , reg byte y , Potential registers zp[1]:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] : zp[1]:18 , reg byte x , reg byte y , Potential registers zp[2]:19 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] : zp[2]:19 , Potential registers zp[2]:21 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] : zp[2]:21 , Potential registers zp[1]:23 [ atan2_16::i#2 atan2_16::i#1 ] : zp[1]:23 , reg byte x , reg byte y , Potential registers zp[2]:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] : zp[2]:24 , Potential registers zp[2]:26 [ atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ] : zp[2]:26 , Potential registers zp[1]:28 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] : zp[1]:28 , reg byte x , reg byte y , Potential registers zp[2]:29 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] : zp[2]:29 , Potential registers zp[2]:31 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] : zp[2]:31 , Potential registers zp[2]:33 [ print_uint_at::w#2 print_uint_at::w#0 print_uint_at::w#1 ] : zp[2]:33 , Potential registers zp[2]:35 [ print_uint_at::at#2 ] : zp[2]:35 , Potential registers zp[1]:37 [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ] : zp[1]:37 , reg byte x , Potential registers zp[2]:38 [ print_uchar_at::at#2 print_uchar_at::at#0 print_uchar_at::at#1 ] : zp[2]:38 , Potential registers zp[1]:40 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] : zp[1]:40 , reg byte x , reg byte y , Potential registers zp[2]:41 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] : zp[2]:41 , Potential registers zp[4]:43 [ clock::return#2 ] : zp[4]:43 , Potential registers zp[4]:47 [ main::$4 ] : zp[4]:47 , Potential registers zp[4]:51 [ main::cyclecount#0 ] : zp[4]:51 , Potential registers zp[4]:55 [ print_ulong_at::dw#0 ] : zp[4]:55 , Potential registers zp[1]:59 [ init_font_hex::$0 ] : zp[1]:59 , reg byte x , reg byte y , Potential registers zp[1]:60 [ init_font_hex::$1 ] : zp[1]:60 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:61 [ init_font_hex::$2 ] : zp[1]:61 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:62 [ init_font_hex::idx#3 ] : zp[1]:62 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:63 [ init_angle_screen::$3 ] : zp[1]:63 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:64 [ init_angle_screen::$4 ] : zp[1]:64 , reg byte a , reg byte x , reg byte y , Potential registers zp[2]:65 [ init_angle_screen::xw#0 ] : zp[2]:65 , Potential registers zp[1]:67 [ init_angle_screen::$5 ] : zp[1]:67 , reg byte a , reg byte x , reg byte y , Potential registers zp[2]:68 [ init_angle_screen::yw#0 ] : zp[2]:68 , Potential registers zp[2]:70 [ atan2_16::x#0 ] : zp[2]:70 , Potential registers zp[2]:72 [ atan2_16::y#0 ] : zp[2]:72 , Potential registers zp[2]:74 [ atan2_16::return#2 ] : zp[2]:74 , Potential registers zp[2]:76 [ init_angle_screen::angle_w#0 ] : zp[2]:76 , Potential registers zp[2]:78 [ init_angle_screen::$7 ] : zp[2]:78 , Potential registers zp[1]:80 [ init_angle_screen::ang_w#0 ] : zp[1]:80 , reg byte x , reg byte y , Potential registers zp[1]:81 [ init_angle_screen::$9 ] : zp[1]:81 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:82 [ init_angle_screen::$10 ] : zp[1]:82 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:83 [ init_angle_screen::$11 ] : zp[1]:83 , reg byte a , reg byte x , reg byte y , Potential registers zp[4]:84 [ clock::return#0 ] : zp[4]:84 , Potential registers zp[1]:88 [ atan2_16::$23 ] : zp[1]:88 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:89 [ atan2_16::$22 ] : zp[1]:89 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:90 [ print_uchar_at::$0 ] : zp[1]:90 , reg byte a , reg byte x , reg byte y , Potential registers zp[1]:91 [ print_uchar_at::$2 ] : zp[1]:91 , reg byte x , reg byte y , REGISTER UPLIFT SCOPES Uplift Scope [atan2_16] 286,666,670.58: zp[1]:28 [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] 206,000,008: zp[2]:29 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] 173,333,338.67: zp[2]:31 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] 75,248,103.76: zp[2]:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] 26,909,340.68: zp[2]:19 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] 22,737,342.67: zp[2]:21 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] 20,000,002: zp[1]:88 [ atan2_16::$23 ] 20,000,002: zp[1]:89 [ atan2_16::$22 ] 17,083,335.04: zp[1]:23 [ atan2_16::i#2 atan2_16::i#1 ] 82,008.5: zp[2]:26 [ atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ] 2,002: zp[2]:74 [ atan2_16::return#2 ] 1,079.08: zp[2]:70 [ atan2_16::x#0 ] 1,025.12: zp[2]:72 [ atan2_16::y#0 ] Uplift Scope [init_font_hex] 21,668.83: zp[1]:10 [ init_font_hex::i#2 init_font_hex::i#1 ] 20,002: zp[1]:60 [ init_font_hex::$1 ] 20,002: zp[1]:61 [ init_font_hex::$2 ] 11,501.6: zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ] 10,001: zp[1]:59 [ init_font_hex::$0 ] 2,002: zp[1]:62 [ init_font_hex::idx#3 ] 1,634.97: zp[1]:9 [ init_font_hex::c1#4 init_font_hex::c1#1 ] 1,631.57: zp[2]:5 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] 1,423.81: zp[2]:7 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] 634.17: zp[2]:2 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] 162.13: zp[1]:4 [ init_font_hex::c#6 init_font_hex::c#1 ] Uplift Scope [print_char_at] 15,006: zp[1]:40 [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] 15,006: zp[2]:41 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] Uplift Scope [init_angle_screen] 2,184: zp[1]:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] 2,002: zp[1]:63 [ init_angle_screen::$3 ] 2,002: zp[1]:64 [ init_angle_screen::$4 ] 2,002: zp[1]:67 [ init_angle_screen::$5 ] 2,002: zp[2]:76 [ init_angle_screen::angle_w#0 ] 2,002: zp[2]:78 [ init_angle_screen::$7 ] 2,002: zp[1]:81 [ init_angle_screen::$9 ] 2,002: zp[1]:82 [ init_angle_screen::$10 ] 2,002: zp[1]:83 [ init_angle_screen::$11 ] 1,287: zp[1]:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] 834.17: zp[1]:80 [ init_angle_screen::ang_w#0 ] 500.5: zp[2]:68 [ init_angle_screen::yw#0 ] 333.67: zp[2]:65 [ init_angle_screen::xw#0 ] 197.77: zp[1]:12 [ init_angle_screen::y#5 init_angle_screen::y#1 ] 155.49: zp[2]:15 [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#1 ] 142.33: zp[2]:13 [ init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#1 ] Uplift Scope [print_uchar_at] 2,002: zp[1]:90 [ print_uchar_at::$0 ] 1,001: zp[1]:91 [ print_uchar_at::$2 ] 771.33: zp[2]:38 [ print_uchar_at::at#2 print_uchar_at::at#0 print_uchar_at::at#1 ] 642.8: zp[1]:37 [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ] Uplift Scope [print_uint_at] 100: zp[2]:33 [ print_uint_at::w#2 print_uint_at::w#0 print_uint_at::w#1 ] 40.4: zp[2]:35 [ print_uint_at::at#2 ] Uplift Scope [clock] 4.33: zp[4]:84 [ clock::return#0 ] 4: zp[4]:43 [ clock::return#2 ] Uplift Scope [print_ulong_at] 8: zp[4]:55 [ print_ulong_at::dw#0 ] Uplift Scope [main] 4: zp[4]:47 [ main::$4 ] 4: zp[4]:51 [ main::cyclecount#0 ] Uplift Scope [RADIX] Uplift Scope [MOS6526_CIA] Uplift Scope [MOS6569_VICII] Uplift Scope [MOS6581_SID] Uplift Scope [clock_start] Uplift Scope [] Uplifting [atan2_16] best 1157259 combination reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp[2]:29 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp[2]:31 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp[2]:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] zp[2]:19 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] zp[2]:21 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] reg byte a [ atan2_16::$23 ] reg byte a [ atan2_16::$22 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] zp[2]:26 [ atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ] zp[2]:74 [ atan2_16::return#2 ] zp[2]:70 [ atan2_16::x#0 ] zp[2]:72 [ atan2_16::y#0 ] Limited combination testing to 100 combinations of 144 possible. Uplifting [init_font_hex] best 1138259 combination reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ] zp[1]:59 [ init_font_hex::$0 ] zp[1]:62 [ init_font_hex::idx#3 ] zp[1]:9 [ init_font_hex::c1#4 init_font_hex::c1#1 ] zp[2]:5 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp[2]:7 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] zp[2]:2 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp[1]:4 [ init_font_hex::c#6 init_font_hex::c#1 ] Limited combination testing to 100 combinations of 6912 possible. Uplifting [print_char_at] best 1138252 combination reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] zp[2]:41 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] Uplifting [init_angle_screen] best 1136652 combination zp[1]:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$4 ] reg byte a [ init_angle_screen::$5 ] zp[2]:76 [ init_angle_screen::angle_w#0 ] zp[2]:78 [ init_angle_screen::$7 ] zp[1]:81 [ init_angle_screen::$9 ] zp[1]:82 [ init_angle_screen::$10 ] zp[1]:83 [ init_angle_screen::$11 ] zp[1]:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] zp[1]:80 [ init_angle_screen::ang_w#0 ] zp[2]:68 [ init_angle_screen::yw#0 ] zp[2]:65 [ init_angle_screen::xw#0 ] zp[1]:12 [ init_angle_screen::y#5 init_angle_screen::y#1 ] zp[2]:15 [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#1 ] zp[2]:13 [ init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#1 ] Limited combination testing to 100 combinations of 331776 possible. Uplifting [print_uchar_at] best 1136644 combination reg byte a [ print_uchar_at::$0 ] reg byte y [ print_uchar_at::$2 ] zp[2]:38 [ print_uchar_at::at#2 print_uchar_at::at#0 print_uchar_at::at#1 ] zp[1]:37 [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ] Uplifting [print_uint_at] best 1136644 combination zp[2]:33 [ print_uint_at::w#2 print_uint_at::w#0 print_uint_at::w#1 ] zp[2]:35 [ print_uint_at::at#2 ] Uplifting [clock] best 1136644 combination zp[4]:84 [ clock::return#0 ] zp[4]:43 [ clock::return#2 ] Uplifting [print_ulong_at] best 1136644 combination zp[4]:55 [ print_ulong_at::dw#0 ] Uplifting [main] best 1136644 combination zp[4]:47 [ main::$4 ] zp[4]:51 [ main::cyclecount#0 ] Uplifting [RADIX] best 1136644 combination Uplifting [MOS6526_CIA] best 1136644 combination Uplifting [MOS6569_VICII] best 1136644 combination Uplifting [MOS6581_SID] best 1136644 combination Uplifting [clock_start] best 1136644 combination Uplifting [] best 1136644 combination Attempting to uplift remaining variables inzp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ] Uplifting [init_font_hex] best 1136644 combination zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ] Attempting to uplift remaining variables inzp[1]:59 [ init_font_hex::$0 ] Uplifting [init_font_hex] best 1136644 combination zp[1]:59 [ init_font_hex::$0 ] Attempting to uplift remaining variables inzp[1]:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] Uplifting [init_angle_screen] best 1136644 combination zp[1]:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] Attempting to uplift remaining variables inzp[1]:62 [ init_font_hex::idx#3 ] Uplifting [init_font_hex] best 1136044 combination reg byte y [ init_font_hex::idx#3 ] Attempting to uplift remaining variables inzp[1]:81 [ init_angle_screen::$9 ] Uplifting [init_angle_screen] best 1135444 combination reg byte a [ init_angle_screen::$9 ] Attempting to uplift remaining variables inzp[1]:82 [ init_angle_screen::$10 ] Uplifting [init_angle_screen] best 1135044 combination reg byte a [ init_angle_screen::$10 ] Attempting to uplift remaining variables inzp[1]:83 [ init_angle_screen::$11 ] Uplifting [init_angle_screen] best 1134444 combination reg byte a [ init_angle_screen::$11 ] Attempting to uplift remaining variables inzp[1]:9 [ init_font_hex::c1#4 init_font_hex::c1#1 ] Uplifting [init_font_hex] best 1134444 combination zp[1]:9 [ init_font_hex::c1#4 init_font_hex::c1#1 ] Attempting to uplift remaining variables inzp[1]:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] Uplifting [init_angle_screen] best 1134444 combination zp[1]:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] Attempting to uplift remaining variables inzp[1]:80 [ init_angle_screen::ang_w#0 ] Uplifting [init_angle_screen] best 1134444 combination zp[1]:80 [ init_angle_screen::ang_w#0 ] Attempting to uplift remaining variables inzp[1]:37 [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ] Uplifting [print_uchar_at] best 1134444 combination zp[1]:37 [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ] Attempting to uplift remaining variables inzp[1]:12 [ init_angle_screen::y#5 init_angle_screen::y#1 ] Uplifting [init_angle_screen] best 1134444 combination zp[1]:12 [ init_angle_screen::y#5 init_angle_screen::y#1 ] Attempting to uplift remaining variables inzp[1]:4 [ init_font_hex::c#6 init_font_hex::c#1 ] Uplifting [init_font_hex] best 1134444 combination zp[1]:4 [ init_font_hex::c#6 init_font_hex::c#1 ] Coalescing zero page register [ zp[2]:35 [ print_uint_at::at#2 ] ] with [ zp[2]:38 [ print_uchar_at::at#2 print_uchar_at::at#0 print_uchar_at::at#1 ] ] - score: 2 Coalescing zero page register [ zp[2]:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 ] ] with [ zp[2]:26 [ atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ] ] - score: 1 Coalescing zero page register [ zp[4]:43 [ clock::return#2 ] ] with [ zp[4]:47 [ main::$4 ] ] - score: 1 Coalescing zero page register [ zp[4]:43 [ clock::return#2 main::$4 ] ] with [ zp[4]:84 [ clock::return#0 ] ] - score: 1 Coalescing zero page register [ zp[4]:51 [ main::cyclecount#0 ] ] with [ zp[4]:55 [ print_ulong_at::dw#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:65 [ init_angle_screen::xw#0 ] ] with [ zp[2]:70 [ atan2_16::x#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:68 [ init_angle_screen::yw#0 ] ] with [ zp[2]:72 [ atan2_16::y#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:74 [ atan2_16::return#2 ] ] with [ zp[2]:76 [ init_angle_screen::angle_w#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 ] ] with [ zp[2]:74 [ atan2_16::return#2 init_angle_screen::angle_w#0 ] ] - score: 1 Coalescing zero page register [ zp[4]:43 [ clock::return#2 main::$4 clock::return#0 ] ] with [ zp[4]:51 [ main::cyclecount#0 print_ulong_at::dw#0 ] ] - score: 1 Coalescing zero page register [ zp[2]:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 atan2_16::return#2 init_angle_screen::angle_w#0 ] ] with [ zp[2]:78 [ init_angle_screen::$7 ] ] - score: 1 Coalescing zero page register [ zp[1]:12 [ init_angle_screen::y#5 init_angle_screen::y#1 ] ] with [ zp[1]:4 [ init_font_hex::c#6 init_font_hex::c#1 ] ] Coalescing zero page register [ zp[2]:13 [ init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#1 ] ] with [ zp[2]:2 [ init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] ] Coalescing zero page register [ zp[2]:15 [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#1 ] ] with [ zp[2]:5 [ init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] ] Coalescing zero page register [ zp[1]:17 [ init_angle_screen::x#2 init_angle_screen::x#1 ] ] with [ zp[1]:9 [ init_font_hex::c1#4 init_font_hex::c1#1 ] ] Coalescing zero page register [ zp[1]:18 [ init_angle_screen::xb#2 init_angle_screen::xb#1 ] ] with [ zp[1]:11 [ init_font_hex::idx#5 init_font_hex::idx#2 ] ] Coalescing zero page register [ zp[2]:19 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 ] ] with [ zp[2]:7 [ init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] ] Coalescing zero page register [ zp[2]:33 [ print_uint_at::w#2 print_uint_at::w#0 print_uint_at::w#1 ] ] with [ zp[2]:21 [ atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] ] Coalescing zero page register [ zp[2]:35 [ print_uint_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uchar_at::at#1 ] ] with [ zp[2]:24 [ atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$7 ] ] Coalescing zero page register [ zp[2]:41 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 ] ] with [ zp[2]:29 [ atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] ] Coalescing zero page register [ zp[1]:59 [ init_font_hex::$0 ] ] with [ zp[1]:37 [ print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ] ] Coalescing zero page register [ zp[1]:80 [ init_angle_screen::ang_w#0 ] ] with [ zp[1]:59 [ init_font_hex::$0 print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ] ] Allocated (was zp[1]:12) zp[1]:2 [ init_angle_screen::y#5 init_angle_screen::y#1 init_font_hex::c#6 init_font_hex::c#1 ] Allocated (was zp[2]:13) zp[2]:3 [ init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#1 init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] Allocated (was zp[2]:15) zp[2]:5 [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#1 init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] Allocated (was zp[1]:17) zp[1]:7 [ init_angle_screen::x#2 init_angle_screen::x#1 init_font_hex::c1#4 init_font_hex::c1#1 ] Allocated (was zp[1]:18) zp[1]:8 [ init_angle_screen::xb#2 init_angle_screen::xb#1 init_font_hex::idx#5 init_font_hex::idx#2 ] Allocated (was zp[2]:19) zp[2]:9 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] Allocated (was zp[2]:31) zp[2]:11 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] Allocated (was zp[2]:33) zp[2]:13 [ print_uint_at::w#2 print_uint_at::w#0 print_uint_at::w#1 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] Allocated (was zp[2]:35) zp[2]:15 [ print_uint_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uchar_at::at#1 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$7 ] Allocated (was zp[2]:41) zp[2]:17 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] Allocated (was zp[4]:43) zp[4]:19 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_ulong_at::dw#0 ] Allocated (was zp[2]:65) zp[2]:23 [ init_angle_screen::xw#0 atan2_16::x#0 ] Allocated (was zp[2]:68) zp[2]:25 [ init_angle_screen::yw#0 atan2_16::y#0 ] Allocated (was zp[1]:80) zp[1]:27 [ init_angle_screen::ang_w#0 init_font_hex::$0 print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments // Calculate the angle to the center of the screen - and show it using font-hex // 4.65 million cycles // C standard library stdlib.h // Implementation of functions found int C stdlib.h / stdlib.c // C standard library string.h // Functions to manipulate C strings and arrays. // Upstart // Commodore 64 PRG executable file .file [name="screen-center-angle.prg", type="prg", segments="Program"] .segmentdef Program [segments="Basic, Code, Data"] .segmentdef Basic [start=$0801] .segmentdef Code [start=$80d] .segmentdef Data [startAfter="Code"] .segment Basic :BasicUpstart(main) // Global Constants & labels // Timer Control - Start/stop timer (0:stop, 1: start) .const CIA_TIMER_CONTROL_START = 1 // Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high) .const CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A = $40 // The number of iterations performed during 16-bit CORDIC atan2 calculation .const CORDIC_ITERATIONS_16 = $f // Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine. // To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code. .const CLOCKS_PER_INIT = $12 .const OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL = $e .const OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL = $f .label D018 = $d018 // The CIA#2: Serial bus, RS-232, VIC memory bank .label CIA2 = $dd00 // CIA#2 timer A&B as one single 32-bit value .label CIA2_TIMER_AB = $dd04 .label CHARSET = $2000 .label SCREEN = $2800 .segment Code // main main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f .label BASE_SCREEN = $400 .label BASE_CHARSET = $1000 .label __4 = $13 .label cyclecount = $13 // [1] call init_font_hex // [17] phi from main to init_font_hex [phi:main->init_font_hex] init_font_hex_from_main: jsr init_font_hex // [2] phi from main to main::toD0181 [phi:main->main::toD0181] toD0181_from_main: jmp toD0181 // main::toD0181 toD0181: jmp __b1 // main::@1 __b1: // [3] *D018 = main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 // [4] call clock_start jsr clock_start // [5] phi from main::@1 to main::@3 [phi:main::@1->main::@3] __b3_from___b1: jmp __b3 // main::@3 __b3: // [6] call init_angle_screen // [46] phi from main::@3 to init_angle_screen [phi:main::@3->init_angle_screen] init_angle_screen_from___b3: jsr init_angle_screen // [7] phi from main::@3 to main::@4 [phi:main::@3->main::@4] __b4_from___b3: jmp __b4 // main::@4 __b4: // [8] call clock jsr clock // [9] clock::return#2 = clock::return#0 jmp __b5 // main::@5 __b5: // [10] main::$4 = clock::return#2 // [11] main::cyclecount#0 = main::$4 - CLOCKS_PER_INIT -- vduz1=vduz1_minus_vduc1 lda.z cyclecount sec sbc #CLOCKS_PER_INIT sta.z cyclecount+1 lda.z cyclecount+2 sbc #>$10 sta.z cyclecount+2 lda.z cyclecount+3 sbc #>CLOCKS_PER_INIT>>$10 sta.z cyclecount+3 // [12] print_ulong_at::dw#0 = main::cyclecount#0 // [13] call print_ulong_at jsr print_ulong_at // [14] phi from main::@5 to main::toD0182 [phi:main::@5->main::toD0182] toD0182_from___b5: jmp toD0182 // main::toD0182 toD0182: jmp __b2 // main::@2 __b2: // [15] *D018 = main::toD0182_return#0 -- _deref_pbuc1=vbuc2 lda #toD0182_return sta D018 jmp __breturn // main::@return __breturn: // [16] return rts } // init_font_hex // Make charset from proto chars // init_font_hex(byte* zp(5) charset) init_font_hex: { .label __0 = $1b .label idx = 8 .label proto_lo = 9 .label charset = 5 .label c1 = 7 .label proto_hi = 3 .label c = 2 // [18] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] __b1_from_init_font_hex: // [18] phi init_font_hex::c#6 = 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta.z c // [18] phi init_font_hex::proto_hi#6 = FONT_HEX_PROTO [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta.z proto_hi+1 // [18] phi init_font_hex::charset#5 = CHARSET [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 lda #CHARSET sta.z charset+1 jmp __b1 // [18] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] __b1_from___b5: // [18] phi init_font_hex::c#6 = init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy // [18] phi init_font_hex::proto_hi#6 = init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy // [18] phi init_font_hex::charset#5 = init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy jmp __b1 // init_font_hex::@1 __b1: // [19] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] __b2_from___b1: // [19] phi init_font_hex::c1#4 = 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 lda #0 sta.z c1 // [19] phi init_font_hex::proto_lo#4 = FONT_HEX_PROTO [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta.z proto_lo+1 // [19] phi init_font_hex::charset#2 = init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy jmp __b2 // [19] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] __b2_from___b4: // [19] phi init_font_hex::c1#4 = init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy // [19] phi init_font_hex::proto_lo#4 = init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy // [19] phi init_font_hex::charset#2 = init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy jmp __b2 // init_font_hex::@2 __b2: // [20] *init_font_hex::charset#2 = 0 -- _deref_pbuz1=vbuc1 lda #0 ldy #0 sta (charset),y // [21] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] __b3_from___b2: // [21] phi init_font_hex::idx#5 = 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 lda #1 sta.z idx // [21] phi init_font_hex::i#2 = 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 ldx #0 jmp __b3 // [21] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] __b3_from___b3: // [21] phi init_font_hex::idx#5 = init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy // [21] phi init_font_hex::i#2 = init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy jmp __b3 // init_font_hex::@3 __b3: // [22] init_font_hex::$0 = init_font_hex::proto_hi#6[init_font_hex::i#2] << 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 txa tay lda (proto_hi),y asl asl asl asl sta.z __0 // [23] init_font_hex::$1 = init_font_hex::proto_lo#4[init_font_hex::i#2] << 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 txa tay lda (proto_lo),y asl // [24] init_font_hex::$2 = init_font_hex::$0 | init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora.z __0 // [25] init_font_hex::charset#2[init_font_hex::idx#5] = init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa ldy.z idx sta (charset),y // [26] init_font_hex::idx#2 = ++ init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc.z idx // [27] init_font_hex::i#1 = ++ init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx // [28] if(init_font_hex::i#1!=5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne __b3_from___b3 jmp __b4 // init_font_hex::@4 __b4: // [29] init_font_hex::charset#2[init_font_hex::idx#2] = 0 -- pbuz1_derefidx_vbuz2=vbuc1 lda #0 ldy.z idx sta (charset),y // [30] init_font_hex::idx#3 = ++ init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 ldy.z idx iny // [31] init_font_hex::charset#2[init_font_hex::idx#3] = 0 -- pbuz1_derefidx_vbuyy=vbuc1 lda #0 sta (charset),y // [32] init_font_hex::proto_lo#1 = init_font_hex::proto_lo#4 + 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc.z proto_lo sta.z proto_lo bcc !+ inc.z proto_lo+1 !: // [33] init_font_hex::charset#0 = init_font_hex::charset#2 + 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc.z charset sta.z charset bcc !+ inc.z charset+1 !: // [34] init_font_hex::c1#1 = ++ init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc.z c1 // [35] if(init_font_hex::c1#1!=$10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp.z c1 bne __b2_from___b4 jmp __b5 // init_font_hex::@5 __b5: // [36] init_font_hex::proto_hi#1 = init_font_hex::proto_hi#6 + 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc.z proto_hi sta.z proto_hi bcc !+ inc.z proto_hi+1 !: // [37] init_font_hex::c#1 = ++ init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc.z c // [38] if(init_font_hex::c#1!=$10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp.z c bne __b1_from___b5 jmp __breturn // init_font_hex::@return __breturn: // [39] return rts } // clock_start // Reset & start the processor clock time. The value can be read using clock(). // This uses CIA #2 Timer A+B on the C64 clock_start: { // [40] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = 0 -- _deref_pbuc1=vbuc2 // Setup CIA#2 timer A to count (down) CPU cycles lda #0 sta CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL // [41] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL // [42] *CIA2_TIMER_AB = $ffffffff -- _deref_pduc1=vduc2 lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff sta CIA2_TIMER_AB+1 lda #<$ffffffff>>$10 sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 // [43] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL // [44] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = CIA_TIMER_CONTROL_START -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START sta CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL jmp __breturn // clock_start::@return __breturn: // [45] return rts } // init_angle_screen // Populates 1000 bytes (a screen) with values representing the angle to the center. // Utilizes symmetry around the center init_angle_screen: { .label __7 = $f .label xw = $17 .label yw = $19 .label angle_w = $f .label ang_w = $1b .label x = 7 .label xb = 8 .label screen_topline = 3 .label screen_bottomline = 5 .label y = 2 // [47] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] __b1_from_init_angle_screen: // [47] phi init_angle_screen::screen_bottomline#6 = SCREEN+(word)$28*$c [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 lda #SCREEN+$28*$c sta.z screen_bottomline+1 // [47] phi init_angle_screen::screen_topline#6 = SCREEN+(word)$28*$c [phi:init_angle_screen->init_angle_screen::@1#1] -- pbuz1=pbuc1 lda #SCREEN+$28*$c sta.z screen_topline+1 // [47] phi init_angle_screen::y#5 = 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 lda #0 sta.z y jmp __b1 // [47] phi from init_angle_screen::@4 to init_angle_screen::@1 [phi:init_angle_screen::@4->init_angle_screen::@1] __b1_from___b4: // [47] phi init_angle_screen::screen_bottomline#6 = init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@4->init_angle_screen::@1#0] -- register_copy // [47] phi init_angle_screen::screen_topline#6 = init_angle_screen::screen_topline#1 [phi:init_angle_screen::@4->init_angle_screen::@1#1] -- register_copy // [47] phi init_angle_screen::y#5 = init_angle_screen::y#1 [phi:init_angle_screen::@4->init_angle_screen::@1#2] -- register_copy jmp __b1 // init_angle_screen::@1 __b1: // [48] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] __b2_from___b1: // [48] phi init_angle_screen::xb#2 = $27 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- vbuz1=vbuc1 lda #$27 sta.z xb // [48] phi init_angle_screen::x#2 = 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuz1=vbuc1 lda #0 sta.z x jmp __b2 // init_angle_screen::@2 __b2: // [49] if(init_angle_screen::x#2<$13+1) goto init_angle_screen::@3 -- vbuz1_lt_vbuc1_then_la1 lda.z x cmp #$13+1 bcc __b3 jmp __b4 // init_angle_screen::@4 __b4: // [50] init_angle_screen::screen_topline#1 = init_angle_screen::screen_topline#6 - $28 -- pbuz1=pbuz1_minus_vbuc1 sec lda.z screen_topline sbc #$28 sta.z screen_topline lda.z screen_topline+1 sbc #0 sta.z screen_topline+1 // [51] init_angle_screen::screen_bottomline#1 = init_angle_screen::screen_bottomline#6 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc.z screen_bottomline sta.z screen_bottomline bcc !+ inc.z screen_bottomline+1 !: // [52] init_angle_screen::y#1 = ++ init_angle_screen::y#5 -- vbuz1=_inc_vbuz1 inc.z y // [53] if(init_angle_screen::y#1!=$d) goto init_angle_screen::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$d cmp.z y bne __b1_from___b4 jmp __breturn // init_angle_screen::@return __breturn: // [54] return rts // init_angle_screen::@3 __b3: // [55] init_angle_screen::$3 = init_angle_screen::x#2 << 1 -- vbuaa=vbuz1_rol_1 lda.z x asl // [56] init_angle_screen::$4 = $27 - init_angle_screen::$3 -- vbuaa=vbuc1_minus_vbuaa eor #$ff sec adc #$27 // [57] init_angle_screen::xw#0 = init_angle_screen::$4 w= 0 -- vwuz1=vbuaa_word_vbuc1 ldy #0 sta.z xw+1 sty.z xw // [58] init_angle_screen::$5 = init_angle_screen::y#5 << 1 -- vbuaa=vbuz1_rol_1 lda.z y asl // [59] init_angle_screen::yw#0 = init_angle_screen::$5 w= 0 -- vwuz1=vbuaa_word_vbuc1 ldy #0 sta.z yw+1 sty.z yw // [60] atan2_16::x#0 = (signed word)init_angle_screen::xw#0 // [61] atan2_16::y#0 = (signed word)init_angle_screen::yw#0 // [62] call atan2_16 jsr atan2_16 // [63] atan2_16::return#2 = atan2_16::return#0 jmp __b5 // init_angle_screen::@5 __b5: // [64] init_angle_screen::angle_w#0 = atan2_16::return#2 // [65] init_angle_screen::$7 = init_angle_screen::angle_w#0 + $80 -- vwuz1=vwuz1_plus_vbuc1 lda #$80 clc adc.z __7 sta.z __7 bcc !+ inc.z __7+1 !: // [66] init_angle_screen::ang_w#0 = > init_angle_screen::$7 -- vbuz1=_hi_vwuz2 lda.z __7+1 sta.z ang_w // [67] init_angle_screen::screen_bottomline#6[init_angle_screen::xb#2] = init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 lda.z ang_w ldy.z xb sta (screen_bottomline),y // [68] init_angle_screen::$9 = - init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 lda.z ang_w eor #$ff clc adc #1 // [69] init_angle_screen::screen_topline#6[init_angle_screen::xb#2] = init_angle_screen::$9 -- pbuz1_derefidx_vbuz2=vbuaa ldy.z xb sta (screen_topline),y // [70] init_angle_screen::$10 = $80 + init_angle_screen::ang_w#0 -- vbuaa=vbuc1_plus_vbuz1 lda #$80 clc adc.z ang_w // [71] init_angle_screen::screen_topline#6[init_angle_screen::x#2] = init_angle_screen::$10 -- pbuz1_derefidx_vbuz2=vbuaa ldy.z x sta (screen_topline),y // [72] init_angle_screen::$11 = $80 - init_angle_screen::ang_w#0 -- vbuaa=vbuc1_minus_vbuz1 lda #$80 sec sbc.z ang_w // [73] init_angle_screen::screen_bottomline#6[init_angle_screen::x#2] = init_angle_screen::$11 -- pbuz1_derefidx_vbuz2=vbuaa ldy.z x sta (screen_bottomline),y // [74] init_angle_screen::x#1 = ++ init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 inc.z x // [75] init_angle_screen::xb#1 = -- init_angle_screen::xb#2 -- vbuz1=_dec_vbuz1 dec.z xb // [48] phi from init_angle_screen::@5 to init_angle_screen::@2 [phi:init_angle_screen::@5->init_angle_screen::@2] __b2_from___b5: // [48] phi init_angle_screen::xb#2 = init_angle_screen::xb#1 [phi:init_angle_screen::@5->init_angle_screen::@2#0] -- register_copy // [48] phi init_angle_screen::x#2 = init_angle_screen::x#1 [phi:init_angle_screen::@5->init_angle_screen::@2#1] -- register_copy jmp __b2 } // clock // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { .label return = $13 // [76] clock::return#0 = $ffffffff - *CIA2_TIMER_AB -- vduz1=vduc1_minus__deref_pduc2 lda #<$ffffffff sec sbc CIA2_TIMER_AB sta.z return lda #>$ffffffff sbc CIA2_TIMER_AB+1 sta.z return+1 lda #<$ffffffff>>$10 sbc CIA2_TIMER_AB+2 sta.z return+2 lda #>$ffffffff>>$10 sbc CIA2_TIMER_AB+3 sta.z return+3 jmp __breturn // clock::@return __breturn: // [77] return rts } // print_ulong_at // Print a unsigned long as HEX at a specific position // print_ulong_at(dword zp($13) dw) print_ulong_at: { .label dw = $13 // [78] print_uint_at::w#0 = > print_ulong_at::dw#0 -- vwuz1=_hi_vduz2 lda.z dw+2 sta.z print_uint_at.w lda.z dw+3 sta.z print_uint_at.w+1 // [79] call print_uint_at // [126] phi from print_ulong_at to print_uint_at [phi:print_ulong_at->print_uint_at] print_uint_at_from_print_ulong_at: // [126] phi print_uint_at::at#2 = main::BASE_SCREEN [phi:print_ulong_at->print_uint_at#0] -- pbuz1=pbuc1 lda #main.BASE_SCREEN sta.z print_uint_at.at+1 // [126] phi print_uint_at::w#2 = print_uint_at::w#0 [phi:print_ulong_at->print_uint_at#1] -- register_copy jsr print_uint_at jmp __b1 // print_ulong_at::@1 __b1: // [80] print_uint_at::w#1 = < print_ulong_at::dw#0 -- vwuz1=_lo_vduz2 lda.z dw sta.z print_uint_at.w lda.z dw+1 sta.z print_uint_at.w+1 // [81] call print_uint_at // [126] phi from print_ulong_at::@1 to print_uint_at [phi:print_ulong_at::@1->print_uint_at] print_uint_at_from___b1: // [126] phi print_uint_at::at#2 = main::BASE_SCREEN+4 [phi:print_ulong_at::@1->print_uint_at#0] -- pbuz1=pbuc1 lda #main.BASE_SCREEN+4 sta.z print_uint_at.at+1 // [126] phi print_uint_at::w#2 = print_uint_at::w#1 [phi:print_ulong_at::@1->print_uint_at#1] -- register_copy jsr print_uint_at jmp __breturn // print_ulong_at::@return __breturn: // [82] return rts } // atan2_16 // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) // atan2_16(signed word zp($17) x, signed word zp($19) y) atan2_16: { .label __2 = 9 .label __7 = $d .label yi = 9 .label xi = $d .label angle = $f .label xd = $b .label yd = $11 .label return = $f .label x = $17 .label y = $19 // [83] if(atan2_16::y#0>=0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda.z y+1 bpl __b1 jmp __b2 // atan2_16::@2 __b2: // [84] atan2_16::$2 = - atan2_16::y#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc.z y sta.z __2 lda #0 sbc.z y+1 sta.z __2+1 // [85] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] __b3_from___b1: __b3_from___b2: // [85] phi atan2_16::yi#0 = atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy jmp __b3 // atan2_16::@3 __b3: // [86] if(atan2_16::x#0>=0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 lda.z x+1 bpl __b4 jmp __b5 // atan2_16::@5 __b5: // [87] atan2_16::$7 = - atan2_16::x#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc.z x sta.z __7 lda #0 sbc.z x+1 sta.z __7+1 // [88] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] __b6_from___b4: __b6_from___b5: // [88] phi atan2_16::xi#0 = atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy jmp __b6 // atan2_16::@6 __b6: // [89] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] __b10_from___b6: // [89] phi atan2_16::angle#12 = 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vwuc1 lda #<0 sta.z angle lda #>0 sta.z angle+1 // [89] phi atan2_16::i#2 = 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 ldx #0 // [89] phi atan2_16::xi#3 = atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy // [89] phi atan2_16::yi#3 = atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy jmp __b10 // atan2_16::@10 __b10: // [90] if(atan2_16::yi#3!=0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 lda.z yi+1 ora.z yi bne __b11 // [91] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] __b12_from___b10: __b12_from___b19: // [91] phi atan2_16::angle#6 = atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy jmp __b12 // atan2_16::@12 __b12: // [92] atan2_16::angle#1 = atan2_16::angle#6 >> 1 -- vwuz1=vwuz1_ror_1 lsr.z angle+1 ror.z angle // [93] if(atan2_16::x#0>=0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 lda.z x+1 bpl __b7_from___b12 jmp __b21 // atan2_16::@21 __b21: // [94] atan2_16::angle#4 = $8000 - atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 sbc.z angle sta.z angle lda #>$8000 sbc.z angle+1 sta.z angle+1 // [95] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] __b7_from___b12: __b7_from___b21: // [95] phi atan2_16::angle#11 = atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy jmp __b7 // atan2_16::@7 __b7: // [96] if(atan2_16::y#0>=0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 lda.z y+1 bpl __b8_from___b7 jmp __b9 // atan2_16::@9 __b9: // [97] atan2_16::angle#5 = - atan2_16::angle#11 -- vwuz1=_neg_vwuz1 sec lda #0 sbc.z angle sta.z angle lda #0 sbc.z angle+1 sta.z angle+1 // [98] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] __b8_from___b7: __b8_from___b9: // [98] phi atan2_16::return#0 = atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy jmp __b8 // atan2_16::@8 __b8: jmp __breturn // atan2_16::@return __breturn: // [99] return rts // atan2_16::@11 __b11: // [100] atan2_16::shift#5 = atan2_16::i#2 -- vbuyy=vbuxx txa tay // [101] atan2_16::xd#10 = atan2_16::xi#3 -- vwsz1=vwsz2 lda.z xi sta.z xd lda.z xi+1 sta.z xd+1 // [102] atan2_16::yd#10 = atan2_16::yi#3 -- vwsz1=vwsz2 lda.z yi sta.z yd lda.z yi+1 sta.z yd+1 // [103] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] __b13_from___b11: __b13_from___b14: // [103] phi atan2_16::yd#3 = atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy // [103] phi atan2_16::xd#3 = atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy // [103] phi atan2_16::shift#2 = atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy jmp __b13 // atan2_16::@13 __b13: // [104] if(atan2_16::shift#2>=2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 cpy #2 bcs __b14 jmp __b15 // atan2_16::@15 __b15: // [105] if(0==atan2_16::shift#2) goto atan2_16::@17 -- 0_eq_vbuyy_then_la1 cpy #0 beq __b17_from___b15 jmp __b16 // atan2_16::@16 __b16: // [106] atan2_16::xd#2 = atan2_16::xd#3 >> 1 -- vwsz1=vwsz1_ror_1 lda.z xd+1 cmp #$80 ror.z xd+1 ror.z xd // [107] atan2_16::yd#2 = atan2_16::yd#3 >> 1 -- vwsz1=vwsz1_ror_1 lda.z yd+1 cmp #$80 ror.z yd+1 ror.z yd // [108] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] __b17_from___b15: __b17_from___b16: // [108] phi atan2_16::xd#5 = atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy // [108] phi atan2_16::yd#5 = atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy jmp __b17 // atan2_16::@17 __b17: // [109] if(atan2_16::yi#3>=0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 lda.z yi+1 bpl __b18 jmp __b20 // atan2_16::@20 __b20: // [110] atan2_16::xi#2 = atan2_16::xi#3 - atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 lda.z xi sec sbc.z yd sta.z xi lda.z xi+1 sbc.z yd+1 sta.z xi+1 // [111] atan2_16::yi#2 = atan2_16::yi#3 + atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 lda.z yi clc adc.z xd sta.z yi lda.z yi+1 adc.z xd+1 sta.z yi+1 // [112] atan2_16::$23 = atan2_16::i#2 << 1 -- vbuaa=vbuxx_rol_1 txa asl // [113] atan2_16::angle#3 = atan2_16::angle#12 - CORDIC_ATAN2_ANGLES_16[atan2_16::$23] -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa tay sec lda.z angle sbc CORDIC_ATAN2_ANGLES_16,y sta.z angle lda.z angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta.z angle+1 // [114] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] __b19_from___b18: __b19_from___b20: // [114] phi atan2_16::xi#8 = atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy // [114] phi atan2_16::angle#13 = atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy // [114] phi atan2_16::yi#8 = atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy jmp __b19 // atan2_16::@19 __b19: // [115] atan2_16::i#1 = ++ atan2_16::i#2 -- vbuxx=_inc_vbuxx inx // [116] if(atan2_16::i#1==CORDIC_ITERATIONS_16-1+1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 cpx #CORDIC_ITERATIONS_16-1+1 beq __b12_from___b19 // [89] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] __b10_from___b19: // [89] phi atan2_16::angle#12 = atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy // [89] phi atan2_16::i#2 = atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy // [89] phi atan2_16::xi#3 = atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy // [89] phi atan2_16::yi#3 = atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy jmp __b10 // atan2_16::@18 __b18: // [117] atan2_16::xi#1 = atan2_16::xi#3 + atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 lda.z xi clc adc.z yd sta.z xi lda.z xi+1 adc.z yd+1 sta.z xi+1 // [118] atan2_16::yi#1 = atan2_16::yi#3 - atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 lda.z yi sec sbc.z xd sta.z yi lda.z yi+1 sbc.z xd+1 sta.z yi+1 // [119] atan2_16::$22 = atan2_16::i#2 << 1 -- vbuaa=vbuxx_rol_1 txa asl // [120] atan2_16::angle#2 = atan2_16::angle#12 + CORDIC_ATAN2_ANGLES_16[atan2_16::$22] -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa tay clc lda.z angle adc CORDIC_ATAN2_ANGLES_16,y sta.z angle lda.z angle+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta.z angle+1 jmp __b19_from___b18 // atan2_16::@14 __b14: // [121] atan2_16::xd#1 = atan2_16::xd#3 >> 2 -- vwsz1=vwsz1_ror_2 lda.z xd+1 cmp #$80 ror.z xd+1 ror.z xd lda.z xd+1 cmp #$80 ror.z xd+1 ror.z xd // [122] atan2_16::yd#1 = atan2_16::yd#3 >> 2 -- vwsz1=vwsz1_ror_2 lda.z yd+1 cmp #$80 ror.z yd+1 ror.z yd lda.z yd+1 cmp #$80 ror.z yd+1 ror.z yd // [123] atan2_16::shift#1 = atan2_16::shift#2 - 2 -- vbuyy=vbuyy_minus_2 dey dey jmp __b13_from___b14 // atan2_16::@4 __b4: // [124] atan2_16::xi#13 = atan2_16::x#0 -- vwsz1=vwsz2 lda.z x sta.z xi lda.z x+1 sta.z xi+1 jmp __b6_from___b4 // atan2_16::@1 __b1: // [125] atan2_16::yi#16 = atan2_16::y#0 -- vwsz1=vwsz2 lda.z y sta.z yi lda.z y+1 sta.z yi+1 jmp __b3_from___b1 } // print_uint_at // Print a unsigned int as HEX at a specific position // print_uint_at(word zp($d) w, byte* zp($f) at) print_uint_at: { .label w = $d .label at = $f // [127] print_uchar_at::b#0 = > print_uint_at::w#2 -- vbuz1=_hi_vwuz2 lda.z w+1 sta.z print_uchar_at.b // [128] print_uchar_at::at#0 = print_uint_at::at#2 // [129] call print_uchar_at // [134] phi from print_uint_at to print_uchar_at [phi:print_uint_at->print_uchar_at] print_uchar_at_from_print_uint_at: // [134] phi print_uchar_at::at#2 = print_uchar_at::at#0 [phi:print_uint_at->print_uchar_at#0] -- register_copy // [134] phi print_uchar_at::b#2 = print_uchar_at::b#0 [phi:print_uint_at->print_uchar_at#1] -- register_copy jsr print_uchar_at jmp __b1 // print_uint_at::@1 __b1: // [130] print_uchar_at::b#1 = < print_uint_at::w#2 -- vbuz1=_lo_vwuz2 lda.z w sta.z print_uchar_at.b // [131] print_uchar_at::at#1 = print_uint_at::at#2 + 2 -- pbuz1=pbuz1_plus_vbuc1 lda #2 clc adc.z print_uchar_at.at sta.z print_uchar_at.at bcc !+ inc.z print_uchar_at.at+1 !: // [132] call print_uchar_at // [134] phi from print_uint_at::@1 to print_uchar_at [phi:print_uint_at::@1->print_uchar_at] print_uchar_at_from___b1: // [134] phi print_uchar_at::at#2 = print_uchar_at::at#1 [phi:print_uint_at::@1->print_uchar_at#0] -- register_copy // [134] phi print_uchar_at::b#2 = print_uchar_at::b#1 [phi:print_uint_at::@1->print_uchar_at#1] -- register_copy jsr print_uchar_at jmp __breturn // print_uint_at::@return __breturn: // [133] return rts } // print_uchar_at // Print a char as HEX at a specific position // print_uchar_at(byte zp($1b) b, byte* zp($f) at) print_uchar_at: { .label b = $1b .label at = $f // [135] print_uchar_at::$0 = print_uchar_at::b#2 >> 4 -- vbuaa=vbuz1_ror_4 lda.z b lsr lsr lsr lsr // [136] print_char_at::ch#0 = print_hextab[print_uchar_at::$0] -- vbuxx=pbuc1_derefidx_vbuaa tay ldx print_hextab,y // [137] print_char_at::at#0 = print_uchar_at::at#2 -- pbuz1=pbuz2 lda.z at sta.z print_char_at.at lda.z at+1 sta.z print_char_at.at+1 // [138] call print_char_at // Table of hexadecimal digits // [144] phi from print_uchar_at to print_char_at [phi:print_uchar_at->print_char_at] print_char_at_from_print_uchar_at: // [144] phi print_char_at::at#2 = print_char_at::at#0 [phi:print_uchar_at->print_char_at#0] -- register_copy // [144] phi print_char_at::ch#2 = print_char_at::ch#0 [phi:print_uchar_at->print_char_at#1] -- register_copy jsr print_char_at jmp __b1 // print_uchar_at::@1 __b1: // [139] print_uchar_at::$2 = print_uchar_at::b#2 & $f -- vbuyy=vbuz1_band_vbuc1 lda #$f and.z b tay // [140] print_char_at::at#1 = print_uchar_at::at#2 + 1 -- pbuz1=pbuz2_plus_1 clc lda.z at adc #1 sta.z print_char_at.at lda.z at+1 adc #0 sta.z print_char_at.at+1 // [141] print_char_at::ch#1 = print_hextab[print_uchar_at::$2] -- vbuxx=pbuc1_derefidx_vbuyy ldx print_hextab,y // [142] call print_char_at // [144] phi from print_uchar_at::@1 to print_char_at [phi:print_uchar_at::@1->print_char_at] print_char_at_from___b1: // [144] phi print_char_at::at#2 = print_char_at::at#1 [phi:print_uchar_at::@1->print_char_at#0] -- register_copy // [144] phi print_char_at::ch#2 = print_char_at::ch#1 [phi:print_uchar_at::@1->print_char_at#1] -- register_copy jsr print_char_at jmp __breturn // print_uchar_at::@return __breturn: // [143] return rts } // print_char_at // Print a single char // print_char_at(byte register(X) ch, byte* zp($11) at) print_char_at: { .label at = $11 // [145] *print_char_at::at#2 = print_char_at::ch#2 -- _deref_pbuz1=vbuxx txa ldy #0 sta (at),y jmp __breturn // print_char_at::@return __breturn: // [146] return rts } // File Data .segment Data // Bit patterns for symbols 0-f (3x5 pixels) used in font hex FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... CORDIC_ATAN2_ANGLES_16: .for (var i=0; i0 Replacing instruction ldx #0 with TAX Succesful ASM optimization Pass5UnnecesaryLoadElimination Replacing label __b3_from___b3 with __b3 Replacing label __b2_from___b4 with __b2 Replacing label __b1_from___b5 with __b1 Replacing label __b1_from___b4 with __b1 Replacing label __b7_from___b12 with __b7 Replacing label __b8_from___b7 with __b8 Replacing label __b17_from___b15 with __b17 Replacing label __b12_from___b19 with __b12 Replacing label __b19_from___b18 with __b19 Replacing label __b13_from___b14 with __b13 Replacing label __b6_from___b4 with __b6 Replacing label __b3_from___b1 with __b3 Removing instruction toD0181_from_main: Removing instruction toD0181: Removing instruction __b3_from___b1: Removing instruction init_angle_screen_from___b3: Removing instruction __b4_from___b3: Removing instruction toD0182_from___b5: Removing instruction toD0182: Removing instruction __b1_from___b5: Removing instruction __b2_from___b1: Removing instruction __b2_from___b4: Removing instruction __b3_from___b3: Removing instruction __b1_from___b4: Removing instruction __b2_from___b1: Removing instruction __b3_from___b1: Removing instruction __b3_from___b2: Removing instruction __b6_from___b4: Removing instruction __b6_from___b5: Removing instruction __b10_from___b6: Removing instruction __b12_from___b10: Removing instruction __b12_from___b19: Removing instruction __b7_from___b12: Removing instruction __b7_from___b21: Removing instruction __b8_from___b7: Removing instruction __b8_from___b9: Removing instruction __breturn: Removing instruction __b13_from___b11: Removing instruction __b13_from___b14: Removing instruction __b17_from___b15: Removing instruction __b17_from___b16: Removing instruction __b19_from___b18: Removing instruction __b19_from___b20: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction init_font_hex_from_main: Removing instruction __b1: Removing instruction __b3: Removing instruction __b4: Removing instruction __b5: Removing instruction __b2: Removing instruction __breturn: Removing instruction __b1_from_init_font_hex: Removing instruction __b3_from___b2: Removing instruction __b4: Removing instruction __b5: Removing instruction __breturn: Removing instruction __breturn: Removing instruction __b1_from_init_angle_screen: Removing instruction __b4: Removing instruction __breturn: Removing instruction __b5: Removing instruction __b2_from___b5: Removing instruction __breturn: Removing instruction print_uint_at_from_print_ulong_at: Removing instruction __b1: Removing instruction print_uint_at_from___b1: Removing instruction __breturn: Removing instruction __b2: Removing instruction __b5: Removing instruction __b21: Removing instruction __b9: Removing instruction __b15: Removing instruction __b16: Removing instruction __b20: Removing instruction __b10_from___b19: Removing instruction print_uchar_at_from_print_uint_at: Removing instruction __b1: Removing instruction print_uchar_at_from___b1: Removing instruction __breturn: Removing instruction print_char_at_from_print_uchar_at: Removing instruction __b1: Removing instruction print_char_at_from___b1: Removing instruction __breturn: Removing instruction __breturn: Succesful ASM optimization Pass5UnusedLabelElimination Removing instruction jmp __b1 Removing instruction jmp __b2 Removing instruction jmp __b3 Removing instruction jmp __b1 Succesful ASM optimization Pass5NextJumpElimination Fixing long branch [433] beq __b12 to bne Fixing long branch [328] bpl __b1 to bmi Fixing long branch [340] bpl __b4 to bmi FINAL SYMBOL TABLE const nomodify byte* CHARSET = (byte*) 8192 const nomodify struct MOS6526_CIA* CIA2 = (struct MOS6526_CIA*) 56576 const nomodify dword* CIA2_TIMER_AB = (dword*) 56580 const nomodify byte CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A = $40 const nomodify byte CIA_TIMER_CONTROL_START = 1 const nomodify dword CLOCKS_PER_INIT = $12 const word* CORDIC_ATAN2_ANGLES_16[CORDIC_ITERATIONS_16] = kickasm {{ .for (var i=0; i(word)SCREEN&$3fff*4|>(word)CHARSET/4&$f byte* main::toD0181_screen byte* main::toD0182_gfx byte main::toD0182_return const byte main::toD0182_return#0 toD0182_return = >(word)main::BASE_SCREEN&$3fff*4|>(word)main::BASE_CHARSET/4&$f byte* main::toD0182_screen void print_char_at(byte print_char_at::ch , byte* print_char_at::at) byte* print_char_at::at byte* print_char_at::at#0 at zp[2]:17 2002.0 byte* print_char_at::at#1 at zp[2]:17 1001.0 byte* print_char_at::at#2 at zp[2]:17 12003.0 byte print_char_at::ch byte print_char_at::ch#0 reg byte x 1001.0 byte print_char_at::ch#1 reg byte x 2002.0 byte print_char_at::ch#2 reg byte x 12003.0 const to_nomodify byte* print_hextab[] = "0123456789abcdef"z void print_uchar_at(byte print_uchar_at::b , byte* print_uchar_at::at) byte~ print_uchar_at::$0 reg byte a 2002.0 byte~ print_uchar_at::$2 reg byte y 1001.0 byte* print_uchar_at::at byte* print_uchar_at::at#0 at zp[2]:15 202.0 byte* print_uchar_at::at#1 at zp[2]:15 202.0 byte* print_uchar_at::at#2 at zp[2]:15 367.33333333333337 byte print_uchar_at::b byte print_uchar_at::b#0 b zp[1]:27 101.0 byte print_uchar_at::b#1 b zp[1]:27 101.0 byte print_uchar_at::b#2 b zp[1]:27 440.79999999999995 void print_uint_at(word print_uint_at::w , byte* print_uint_at::at) byte* print_uint_at::at byte* print_uint_at::at#2 at zp[2]:15 40.4 word print_uint_at::w word print_uint_at::w#0 w zp[2]:13 22.0 word print_uint_at::w#1 w zp[2]:13 22.0 word print_uint_at::w#2 w zp[2]:13 56.0 void print_ulong_at(dword print_ulong_at::dw , byte* print_ulong_at::at) byte* print_ulong_at::at dword print_ulong_at::dw dword print_ulong_at::dw#0 dw zp[4]:19 8.0 reg byte x [ init_font_hex::i#2 init_font_hex::i#1 ] zp[1]:2 [ init_angle_screen::y#5 init_angle_screen::y#1 init_font_hex::c#6 init_font_hex::c#1 ] zp[2]:3 [ init_angle_screen::screen_topline#6 init_angle_screen::screen_topline#1 init_font_hex::proto_hi#6 init_font_hex::proto_hi#1 ] zp[2]:5 [ init_angle_screen::screen_bottomline#6 init_angle_screen::screen_bottomline#1 init_font_hex::charset#2 init_font_hex::charset#5 init_font_hex::charset#0 ] zp[1]:7 [ init_angle_screen::x#2 init_angle_screen::x#1 init_font_hex::c1#4 init_font_hex::c1#1 ] zp[1]:8 [ init_angle_screen::xb#2 init_angle_screen::xb#1 init_font_hex::idx#5 init_font_hex::idx#2 ] zp[2]:9 [ atan2_16::yi#3 atan2_16::yi#8 atan2_16::yi#0 atan2_16::yi#16 atan2_16::$2 atan2_16::yi#1 atan2_16::yi#2 init_font_hex::proto_lo#4 init_font_hex::proto_lo#1 ] reg byte x [ atan2_16::i#2 atan2_16::i#1 ] reg byte y [ atan2_16::shift#2 atan2_16::shift#5 atan2_16::shift#1 ] zp[2]:11 [ atan2_16::xd#5 atan2_16::xd#3 atan2_16::xd#10 atan2_16::xd#1 atan2_16::xd#2 ] zp[2]:13 [ print_uint_at::w#2 print_uint_at::w#0 print_uint_at::w#1 atan2_16::xi#3 atan2_16::xi#8 atan2_16::xi#0 atan2_16::xi#13 atan2_16::$7 atan2_16::xi#1 atan2_16::xi#2 ] zp[2]:15 [ print_uint_at::at#2 print_uchar_at::at#2 print_uchar_at::at#0 print_uchar_at::at#1 atan2_16::angle#6 atan2_16::angle#12 atan2_16::angle#13 atan2_16::angle#2 atan2_16::angle#3 atan2_16::return#0 atan2_16::angle#11 atan2_16::angle#1 atan2_16::angle#4 atan2_16::angle#5 atan2_16::return#2 init_angle_screen::angle_w#0 init_angle_screen::$7 ] reg byte x [ print_char_at::ch#2 print_char_at::ch#0 print_char_at::ch#1 ] zp[2]:17 [ print_char_at::at#2 print_char_at::at#0 print_char_at::at#1 atan2_16::yd#5 atan2_16::yd#3 atan2_16::yd#10 atan2_16::yd#1 atan2_16::yd#2 ] zp[4]:19 [ clock::return#2 main::$4 clock::return#0 main::cyclecount#0 print_ulong_at::dw#0 ] reg byte a [ init_font_hex::$1 ] reg byte a [ init_font_hex::$2 ] reg byte y [ init_font_hex::idx#3 ] reg byte a [ init_angle_screen::$3 ] reg byte a [ init_angle_screen::$4 ] zp[2]:23 [ init_angle_screen::xw#0 atan2_16::x#0 ] reg byte a [ init_angle_screen::$5 ] zp[2]:25 [ init_angle_screen::yw#0 atan2_16::y#0 ] zp[1]:27 [ init_angle_screen::ang_w#0 init_font_hex::$0 print_uchar_at::b#2 print_uchar_at::b#0 print_uchar_at::b#1 ] reg byte a [ init_angle_screen::$9 ] reg byte a [ init_angle_screen::$10 ] reg byte a [ init_angle_screen::$11 ] reg byte a [ atan2_16::$23 ] reg byte a [ atan2_16::$22 ] reg byte a [ print_uchar_at::$0 ] reg byte y [ print_uchar_at::$2 ] FINAL ASSEMBLER Score: 1042467 // File Comments // Calculate the angle to the center of the screen - and show it using font-hex // 4.65 million cycles // C standard library stdlib.h // Implementation of functions found int C stdlib.h / stdlib.c // C standard library string.h // Functions to manipulate C strings and arrays. // Upstart // Commodore 64 PRG executable file .file [name="screen-center-angle.prg", type="prg", segments="Program"] .segmentdef Program [segments="Basic, Code, Data"] .segmentdef Basic [start=$0801] .segmentdef Code [start=$80d] .segmentdef Data [startAfter="Code"] .segment Basic :BasicUpstart(main) // Global Constants & labels // Timer Control - Start/stop timer (0:stop, 1: start) .const CIA_TIMER_CONTROL_START = 1 // Timer B Control - Timer counts (00:system cycles, 01: CNT pulses, 10: timer A underflow, 11: time A underflow while CNT is high) .const CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A = $40 // The number of iterations performed during 16-bit CORDIC atan2 calculation .const CORDIC_ITERATIONS_16 = $f // Clock cycles used to start & read the cycle clock by calling clock_start() and clock() once. Can be subtracted when calculating the number of cycles used by a routine. // To make precise cycle measurements interrupts and the display must be disabled so neither steals any cycles from the code. .const CLOCKS_PER_INIT = $12 .const OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL = $e .const OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL = $f .label D018 = $d018 // The CIA#2: Serial bus, RS-232, VIC memory bank .label CIA2 = $dd00 // CIA#2 timer A&B as one single 32-bit value .label CIA2_TIMER_AB = $dd04 .label CHARSET = $2000 .label SCREEN = $2800 .segment Code // main main: { .const toD0181_return = (>(SCREEN&$3fff)*4)|(>CHARSET)/4&$f .const toD0182_return = (>(BASE_SCREEN&$3fff)*4)|(>BASE_CHARSET)/4&$f .label BASE_SCREEN = $400 .label BASE_CHARSET = $1000 .label __4 = $13 .label cyclecount = $13 // init_font_hex(CHARSET) // [1] call init_font_hex // [17] phi from main to init_font_hex [phi:main->init_font_hex] jsr init_font_hex // [2] phi from main to main::toD0181 [phi:main->main::toD0181] // main::toD0181 // main::@1 // *D018 = toD018(SCREEN, CHARSET) // [3] *D018 = main::toD0181_return#0 -- _deref_pbuc1=vbuc2 lda #toD0181_return sta D018 // clock_start() // [4] call clock_start jsr clock_start // [5] phi from main::@1 to main::@3 [phi:main::@1->main::@3] // main::@3 // init_angle_screen(SCREEN) // [6] call init_angle_screen // [46] phi from main::@3 to init_angle_screen [phi:main::@3->init_angle_screen] jsr init_angle_screen // [7] phi from main::@3 to main::@4 [phi:main::@3->main::@4] // main::@4 // clock() // [8] call clock jsr clock // [9] clock::return#2 = clock::return#0 // main::@5 // [10] main::$4 = clock::return#2 // cyclecount = clock()-CLOCKS_PER_INIT // [11] main::cyclecount#0 = main::$4 - CLOCKS_PER_INIT -- vduz1=vduz1_minus_vduc1 lda.z cyclecount sec sbc #CLOCKS_PER_INIT sta.z cyclecount+1 lda.z cyclecount+2 sbc #>$10 sta.z cyclecount+2 lda.z cyclecount+3 sbc #>CLOCKS_PER_INIT>>$10 sta.z cyclecount+3 // print_ulong_at(cyclecount, BASE_SCREEN) // [12] print_ulong_at::dw#0 = main::cyclecount#0 // [13] call print_ulong_at jsr print_ulong_at // [14] phi from main::@5 to main::toD0182 [phi:main::@5->main::toD0182] // main::toD0182 // main::@2 // *D018 = toD018(BASE_SCREEN, BASE_CHARSET) // [15] *D018 = main::toD0182_return#0 -- _deref_pbuc1=vbuc2 lda #toD0182_return sta D018 // main::@return // } // [16] return rts } // init_font_hex // Make charset from proto chars // init_font_hex(byte* zp(5) charset) init_font_hex: { .label __0 = $1b .label idx = 8 .label proto_lo = 9 .label charset = 5 .label c1 = 7 .label proto_hi = 3 .label c = 2 // [18] phi from init_font_hex to init_font_hex::@1 [phi:init_font_hex->init_font_hex::@1] // [18] phi init_font_hex::c#6 = 0 [phi:init_font_hex->init_font_hex::@1#0] -- vbuz1=vbuc1 lda #0 sta.z c // [18] phi init_font_hex::proto_hi#6 = FONT_HEX_PROTO [phi:init_font_hex->init_font_hex::@1#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta.z proto_hi+1 // [18] phi init_font_hex::charset#5 = CHARSET [phi:init_font_hex->init_font_hex::@1#2] -- pbuz1=pbuc1 lda #CHARSET sta.z charset+1 // [18] phi from init_font_hex::@5 to init_font_hex::@1 [phi:init_font_hex::@5->init_font_hex::@1] // [18] phi init_font_hex::c#6 = init_font_hex::c#1 [phi:init_font_hex::@5->init_font_hex::@1#0] -- register_copy // [18] phi init_font_hex::proto_hi#6 = init_font_hex::proto_hi#1 [phi:init_font_hex::@5->init_font_hex::@1#1] -- register_copy // [18] phi init_font_hex::charset#5 = init_font_hex::charset#0 [phi:init_font_hex::@5->init_font_hex::@1#2] -- register_copy // init_font_hex::@1 __b1: // [19] phi from init_font_hex::@1 to init_font_hex::@2 [phi:init_font_hex::@1->init_font_hex::@2] // [19] phi init_font_hex::c1#4 = 0 [phi:init_font_hex::@1->init_font_hex::@2#0] -- vbuz1=vbuc1 lda #0 sta.z c1 // [19] phi init_font_hex::proto_lo#4 = FONT_HEX_PROTO [phi:init_font_hex::@1->init_font_hex::@2#1] -- pbuz1=pbuc1 lda #FONT_HEX_PROTO sta.z proto_lo+1 // [19] phi init_font_hex::charset#2 = init_font_hex::charset#5 [phi:init_font_hex::@1->init_font_hex::@2#2] -- register_copy // [19] phi from init_font_hex::@4 to init_font_hex::@2 [phi:init_font_hex::@4->init_font_hex::@2] // [19] phi init_font_hex::c1#4 = init_font_hex::c1#1 [phi:init_font_hex::@4->init_font_hex::@2#0] -- register_copy // [19] phi init_font_hex::proto_lo#4 = init_font_hex::proto_lo#1 [phi:init_font_hex::@4->init_font_hex::@2#1] -- register_copy // [19] phi init_font_hex::charset#2 = init_font_hex::charset#0 [phi:init_font_hex::@4->init_font_hex::@2#2] -- register_copy // init_font_hex::@2 __b2: // charset[idx++] = 0 // [20] *init_font_hex::charset#2 = 0 -- _deref_pbuz1=vbuc1 lda #0 tay sta (charset),y // [21] phi from init_font_hex::@2 to init_font_hex::@3 [phi:init_font_hex::@2->init_font_hex::@3] // [21] phi init_font_hex::idx#5 = 1 [phi:init_font_hex::@2->init_font_hex::@3#0] -- vbuz1=vbuc1 lda #1 sta.z idx // [21] phi init_font_hex::i#2 = 0 [phi:init_font_hex::@2->init_font_hex::@3#1] -- vbuxx=vbuc1 ldx #0 // [21] phi from init_font_hex::@3 to init_font_hex::@3 [phi:init_font_hex::@3->init_font_hex::@3] // [21] phi init_font_hex::idx#5 = init_font_hex::idx#2 [phi:init_font_hex::@3->init_font_hex::@3#0] -- register_copy // [21] phi init_font_hex::i#2 = init_font_hex::i#1 [phi:init_font_hex::@3->init_font_hex::@3#1] -- register_copy // init_font_hex::@3 __b3: // proto_hi[i]<<4 // [22] init_font_hex::$0 = init_font_hex::proto_hi#6[init_font_hex::i#2] << 4 -- vbuz1=pbuz2_derefidx_vbuxx_rol_4 txa tay lda (proto_hi),y asl asl asl asl sta.z __0 // proto_lo[i]<<1 // [23] init_font_hex::$1 = init_font_hex::proto_lo#4[init_font_hex::i#2] << 1 -- vbuaa=pbuz1_derefidx_vbuxx_rol_1 txa tay lda (proto_lo),y asl // proto_hi[i]<<4 | proto_lo[i]<<1 // [24] init_font_hex::$2 = init_font_hex::$0 | init_font_hex::$1 -- vbuaa=vbuz1_bor_vbuaa ora.z __0 // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1 // [25] init_font_hex::charset#2[init_font_hex::idx#5] = init_font_hex::$2 -- pbuz1_derefidx_vbuz2=vbuaa ldy.z idx sta (charset),y // charset[idx++] = proto_hi[i]<<4 | proto_lo[i]<<1; // [26] init_font_hex::idx#2 = ++ init_font_hex::idx#5 -- vbuz1=_inc_vbuz1 inc.z idx // for( byte i: 0..4) // [27] init_font_hex::i#1 = ++ init_font_hex::i#2 -- vbuxx=_inc_vbuxx inx // [28] if(init_font_hex::i#1!=5) goto init_font_hex::@3 -- vbuxx_neq_vbuc1_then_la1 cpx #5 bne __b3 // init_font_hex::@4 // charset[idx++] = 0 // [29] init_font_hex::charset#2[init_font_hex::idx#2] = 0 -- pbuz1_derefidx_vbuz2=vbuc1 lda #0 ldy.z idx sta (charset),y // charset[idx++] = 0; // [30] init_font_hex::idx#3 = ++ init_font_hex::idx#2 -- vbuyy=_inc_vbuz1 iny // charset[idx++] = 0 // [31] init_font_hex::charset#2[init_font_hex::idx#3] = 0 -- pbuz1_derefidx_vbuyy=vbuc1 sta (charset),y // proto_lo += 5 // [32] init_font_hex::proto_lo#1 = init_font_hex::proto_lo#4 + 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc.z proto_lo sta.z proto_lo bcc !+ inc.z proto_lo+1 !: // charset += 8 // [33] init_font_hex::charset#0 = init_font_hex::charset#2 + 8 -- pbuz1=pbuz1_plus_vbuc1 lda #8 clc adc.z charset sta.z charset bcc !+ inc.z charset+1 !: // for( byte c: 0..15 ) // [34] init_font_hex::c1#1 = ++ init_font_hex::c1#4 -- vbuz1=_inc_vbuz1 inc.z c1 // [35] if(init_font_hex::c1#1!=$10) goto init_font_hex::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp.z c1 bne __b2 // init_font_hex::@5 // proto_hi += 5 // [36] init_font_hex::proto_hi#1 = init_font_hex::proto_hi#6 + 5 -- pbuz1=pbuz1_plus_vbuc1 lda #5 clc adc.z proto_hi sta.z proto_hi bcc !+ inc.z proto_hi+1 !: // for( byte c: 0..15 ) // [37] init_font_hex::c#1 = ++ init_font_hex::c#6 -- vbuz1=_inc_vbuz1 inc.z c // [38] if(init_font_hex::c#1!=$10) goto init_font_hex::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$10 cmp.z c bne __b1 // init_font_hex::@return // } // [39] return rts } // clock_start // Reset & start the processor clock time. The value can be read using clock(). // This uses CIA #2 Timer A+B on the C64 clock_start: { // CIA2->TIMER_A_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES // [40] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = 0 -- _deref_pbuc1=vbuc2 // Setup CIA#2 timer A to count (down) CPU cycles lda #0 sta CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL // CIA2->TIMER_B_CONTROL = CIA_TIMER_CONTROL_STOP | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A // [41] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL // *CIA2_TIMER_AB = 0xffffffff // [42] *CIA2_TIMER_AB = $ffffffff -- _deref_pduc1=vduc2 lda #<$ffffffff sta CIA2_TIMER_AB lda #>$ffffffff sta CIA2_TIMER_AB+1 lda #<$ffffffff>>$10 sta CIA2_TIMER_AB+2 lda #>$ffffffff>>$10 sta CIA2_TIMER_AB+3 // CIA2->TIMER_B_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A // [43] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL) = CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START|CIA_TIMER_CONTROL_B_COUNT_UNDERFLOW_A sta CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_B_CONTROL // CIA2->TIMER_A_CONTROL = CIA_TIMER_CONTROL_START | CIA_TIMER_CONTROL_CONTINUOUS | CIA_TIMER_CONTROL_A_COUNT_CYCLES // [44] *((byte*)CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL) = CIA_TIMER_CONTROL_START -- _deref_pbuc1=vbuc2 lda #CIA_TIMER_CONTROL_START sta CIA2+OFFSET_STRUCT_MOS6526_CIA_TIMER_A_CONTROL // clock_start::@return // } // [45] return rts } // init_angle_screen // Populates 1000 bytes (a screen) with values representing the angle to the center. // Utilizes symmetry around the center init_angle_screen: { .label __7 = $f .label xw = $17 .label yw = $19 .label angle_w = $f .label ang_w = $1b .label x = 7 .label xb = 8 .label screen_topline = 3 .label screen_bottomline = 5 .label y = 2 // [47] phi from init_angle_screen to init_angle_screen::@1 [phi:init_angle_screen->init_angle_screen::@1] // [47] phi init_angle_screen::screen_bottomline#6 = SCREEN+(word)$28*$c [phi:init_angle_screen->init_angle_screen::@1#0] -- pbuz1=pbuc1 lda #SCREEN+$28*$c sta.z screen_bottomline+1 // [47] phi init_angle_screen::screen_topline#6 = SCREEN+(word)$28*$c [phi:init_angle_screen->init_angle_screen::@1#1] -- pbuz1=pbuc1 lda #SCREEN+$28*$c sta.z screen_topline+1 // [47] phi init_angle_screen::y#5 = 0 [phi:init_angle_screen->init_angle_screen::@1#2] -- vbuz1=vbuc1 lda #0 sta.z y // [47] phi from init_angle_screen::@4 to init_angle_screen::@1 [phi:init_angle_screen::@4->init_angle_screen::@1] // [47] phi init_angle_screen::screen_bottomline#6 = init_angle_screen::screen_bottomline#1 [phi:init_angle_screen::@4->init_angle_screen::@1#0] -- register_copy // [47] phi init_angle_screen::screen_topline#6 = init_angle_screen::screen_topline#1 [phi:init_angle_screen::@4->init_angle_screen::@1#1] -- register_copy // [47] phi init_angle_screen::y#5 = init_angle_screen::y#1 [phi:init_angle_screen::@4->init_angle_screen::@1#2] -- register_copy // init_angle_screen::@1 __b1: // [48] phi from init_angle_screen::@1 to init_angle_screen::@2 [phi:init_angle_screen::@1->init_angle_screen::@2] // [48] phi init_angle_screen::xb#2 = $27 [phi:init_angle_screen::@1->init_angle_screen::@2#0] -- vbuz1=vbuc1 lda #$27 sta.z xb // [48] phi init_angle_screen::x#2 = 0 [phi:init_angle_screen::@1->init_angle_screen::@2#1] -- vbuz1=vbuc1 lda #0 sta.z x // init_angle_screen::@2 __b2: // for( byte x=0,xb=39; x<=19; x++, xb--) // [49] if(init_angle_screen::x#2<$13+1) goto init_angle_screen::@3 -- vbuz1_lt_vbuc1_then_la1 lda.z x cmp #$13+1 bcc __b3 // init_angle_screen::@4 // screen_topline -= 40 // [50] init_angle_screen::screen_topline#1 = init_angle_screen::screen_topline#6 - $28 -- pbuz1=pbuz1_minus_vbuc1 sec lda.z screen_topline sbc #$28 sta.z screen_topline lda.z screen_topline+1 sbc #0 sta.z screen_topline+1 // screen_bottomline += 40 // [51] init_angle_screen::screen_bottomline#1 = init_angle_screen::screen_bottomline#6 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc adc.z screen_bottomline sta.z screen_bottomline bcc !+ inc.z screen_bottomline+1 !: // for(byte y: 0..12) // [52] init_angle_screen::y#1 = ++ init_angle_screen::y#5 -- vbuz1=_inc_vbuz1 inc.z y // [53] if(init_angle_screen::y#1!=$d) goto init_angle_screen::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$d cmp.z y bne __b1 // init_angle_screen::@return // } // [54] return rts // init_angle_screen::@3 __b3: // x*2 // [55] init_angle_screen::$3 = init_angle_screen::x#2 << 1 -- vbuaa=vbuz1_rol_1 lda.z x asl // 39-x*2 // [56] init_angle_screen::$4 = $27 - init_angle_screen::$3 -- vbuaa=vbuc1_minus_vbuaa eor #$ff sec adc #$27 // xw = (signed word)(word){ 39-x*2, 0 } // [57] init_angle_screen::xw#0 = init_angle_screen::$4 w= 0 -- vwuz1=vbuaa_word_vbuc1 ldy #0 sta.z xw+1 sty.z xw // y*2 // [58] init_angle_screen::$5 = init_angle_screen::y#5 << 1 -- vbuaa=vbuz1_rol_1 lda.z y asl // yw = (signed word)(word){ y*2, 0 } // [59] init_angle_screen::yw#0 = init_angle_screen::$5 w= 0 -- vwuz1=vbuaa_word_vbuc1 sta.z yw+1 sty.z yw // atan2_16(xw, yw) // [60] atan2_16::x#0 = (signed word)init_angle_screen::xw#0 // [61] atan2_16::y#0 = (signed word)init_angle_screen::yw#0 // [62] call atan2_16 jsr atan2_16 // [63] atan2_16::return#2 = atan2_16::return#0 // init_angle_screen::@5 // angle_w = atan2_16(xw, yw) // [64] init_angle_screen::angle_w#0 = atan2_16::return#2 // angle_w+0x0080 // [65] init_angle_screen::$7 = init_angle_screen::angle_w#0 + $80 -- vwuz1=vwuz1_plus_vbuc1 lda #$80 clc adc.z __7 sta.z __7 bcc !+ inc.z __7+1 !: // ang_w = >(angle_w+0x0080) // [66] init_angle_screen::ang_w#0 = > init_angle_screen::$7 -- vbuz1=_hi_vwuz2 lda.z __7+1 sta.z ang_w // screen_bottomline[xb] = ang_w // [67] init_angle_screen::screen_bottomline#6[init_angle_screen::xb#2] = init_angle_screen::ang_w#0 -- pbuz1_derefidx_vbuz2=vbuz3 ldy.z xb sta (screen_bottomline),y // -ang_w // [68] init_angle_screen::$9 = - init_angle_screen::ang_w#0 -- vbuaa=_neg_vbuz1 eor #$ff clc adc #1 // screen_topline[xb] = -ang_w // [69] init_angle_screen::screen_topline#6[init_angle_screen::xb#2] = init_angle_screen::$9 -- pbuz1_derefidx_vbuz2=vbuaa sta (screen_topline),y // 0x80+ang_w // [70] init_angle_screen::$10 = $80 + init_angle_screen::ang_w#0 -- vbuaa=vbuc1_plus_vbuz1 lda #$80 clc adc.z ang_w // screen_topline[x] = 0x80+ang_w // [71] init_angle_screen::screen_topline#6[init_angle_screen::x#2] = init_angle_screen::$10 -- pbuz1_derefidx_vbuz2=vbuaa ldy.z x sta (screen_topline),y // 0x80-ang_w // [72] init_angle_screen::$11 = $80 - init_angle_screen::ang_w#0 -- vbuaa=vbuc1_minus_vbuz1 lda #$80 sec sbc.z ang_w // screen_bottomline[x] = 0x80-ang_w // [73] init_angle_screen::screen_bottomline#6[init_angle_screen::x#2] = init_angle_screen::$11 -- pbuz1_derefidx_vbuz2=vbuaa sta (screen_bottomline),y // for( byte x=0,xb=39; x<=19; x++, xb--) // [74] init_angle_screen::x#1 = ++ init_angle_screen::x#2 -- vbuz1=_inc_vbuz1 inc.z x // [75] init_angle_screen::xb#1 = -- init_angle_screen::xb#2 -- vbuz1=_dec_vbuz1 dec.z xb // [48] phi from init_angle_screen::@5 to init_angle_screen::@2 [phi:init_angle_screen::@5->init_angle_screen::@2] // [48] phi init_angle_screen::xb#2 = init_angle_screen::xb#1 [phi:init_angle_screen::@5->init_angle_screen::@2#0] -- register_copy // [48] phi init_angle_screen::x#2 = init_angle_screen::x#1 [phi:init_angle_screen::@5->init_angle_screen::@2#1] -- register_copy jmp __b2 } // clock // Returns the processor clock time used since the beginning of an implementation defined era (normally the beginning of the program). // This uses CIA #2 Timer A+B on the C64, and must be initialized using clock_start() clock: { .label return = $13 // 0xffffffff - *CIA2_TIMER_AB // [76] clock::return#0 = $ffffffff - *CIA2_TIMER_AB -- vduz1=vduc1_minus__deref_pduc2 lda #<$ffffffff sec sbc CIA2_TIMER_AB sta.z return lda #>$ffffffff sbc CIA2_TIMER_AB+1 sta.z return+1 lda #<$ffffffff>>$10 sbc CIA2_TIMER_AB+2 sta.z return+2 lda #>$ffffffff>>$10 sbc CIA2_TIMER_AB+3 sta.z return+3 // clock::@return // } // [77] return rts } // print_ulong_at // Print a unsigned long as HEX at a specific position // print_ulong_at(dword zp($13) dw) print_ulong_at: { .label dw = $13 // print_uint_at(>dw, at) // [78] print_uint_at::w#0 = > print_ulong_at::dw#0 -- vwuz1=_hi_vduz2 lda.z dw+2 sta.z print_uint_at.w lda.z dw+3 sta.z print_uint_at.w+1 // [79] call print_uint_at // [126] phi from print_ulong_at to print_uint_at [phi:print_ulong_at->print_uint_at] // [126] phi print_uint_at::at#2 = main::BASE_SCREEN [phi:print_ulong_at->print_uint_at#0] -- pbuz1=pbuc1 lda #main.BASE_SCREEN sta.z print_uint_at.at+1 // [126] phi print_uint_at::w#2 = print_uint_at::w#0 [phi:print_ulong_at->print_uint_at#1] -- register_copy jsr print_uint_at // print_ulong_at::@1 // print_uint_at(print_uint_at] // [126] phi print_uint_at::at#2 = main::BASE_SCREEN+4 [phi:print_ulong_at::@1->print_uint_at#0] -- pbuz1=pbuc1 lda #main.BASE_SCREEN+4 sta.z print_uint_at.at+1 // [126] phi print_uint_at::w#2 = print_uint_at::w#1 [phi:print_ulong_at::@1->print_uint_at#1] -- register_copy jsr print_uint_at // print_ulong_at::@return // } // [82] return rts } // atan2_16 // Find the atan2(x, y) - which is the angle of the line from (0,0) to (x,y) // Finding the angle requires a binary search using CORDIC_ITERATIONS_16 // Returns the angle in hex-degrees (0=0, 0x8000=PI, 0x10000=2*PI) // atan2_16(signed word zp($17) x, signed word zp($19) y) atan2_16: { .label __2 = 9 .label __7 = $d .label yi = 9 .label xi = $d .label angle = $f .label xd = $b .label yd = $11 .label return = $f .label x = $17 .label y = $19 // (y>=0)?y:-y // [83] if(atan2_16::y#0>=0) goto atan2_16::@1 -- vwsz1_ge_0_then_la1 lda.z y+1 bmi !__b1+ jmp __b1 !__b1: // atan2_16::@2 // [84] atan2_16::$2 = - atan2_16::y#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc.z y sta.z __2 lda #0 sbc.z y+1 sta.z __2+1 // [85] phi from atan2_16::@1 atan2_16::@2 to atan2_16::@3 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3] // [85] phi atan2_16::yi#0 = atan2_16::yi#16 [phi:atan2_16::@1/atan2_16::@2->atan2_16::@3#0] -- register_copy // atan2_16::@3 __b3: // (x>=0)?x:-x // [86] if(atan2_16::x#0>=0) goto atan2_16::@4 -- vwsz1_ge_0_then_la1 lda.z x+1 bmi !__b4+ jmp __b4 !__b4: // atan2_16::@5 // [87] atan2_16::$7 = - atan2_16::x#0 -- vwsz1=_neg_vwsz2 sec lda #0 sbc.z x sta.z __7 lda #0 sbc.z x+1 sta.z __7+1 // [88] phi from atan2_16::@4 atan2_16::@5 to atan2_16::@6 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6] // [88] phi atan2_16::xi#0 = atan2_16::xi#13 [phi:atan2_16::@4/atan2_16::@5->atan2_16::@6#0] -- register_copy // atan2_16::@6 __b6: // [89] phi from atan2_16::@6 to atan2_16::@10 [phi:atan2_16::@6->atan2_16::@10] // [89] phi atan2_16::angle#12 = 0 [phi:atan2_16::@6->atan2_16::@10#0] -- vwuz1=vwuc1 lda #<0 sta.z angle sta.z angle+1 // [89] phi atan2_16::i#2 = 0 [phi:atan2_16::@6->atan2_16::@10#1] -- vbuxx=vbuc1 tax // [89] phi atan2_16::xi#3 = atan2_16::xi#0 [phi:atan2_16::@6->atan2_16::@10#2] -- register_copy // [89] phi atan2_16::yi#3 = atan2_16::yi#0 [phi:atan2_16::@6->atan2_16::@10#3] -- register_copy // atan2_16::@10 __b10: // if(yi==0) // [90] if(atan2_16::yi#3!=0) goto atan2_16::@11 -- vwsz1_neq_0_then_la1 lda.z yi+1 ora.z yi bne __b11 // [91] phi from atan2_16::@10 atan2_16::@19 to atan2_16::@12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12] // [91] phi atan2_16::angle#6 = atan2_16::angle#12 [phi:atan2_16::@10/atan2_16::@19->atan2_16::@12#0] -- register_copy // atan2_16::@12 __b12: // angle /=2 // [92] atan2_16::angle#1 = atan2_16::angle#6 >> 1 -- vwuz1=vwuz1_ror_1 lsr.z angle+1 ror.z angle // if(x<0) // [93] if(atan2_16::x#0>=0) goto atan2_16::@7 -- vwsz1_ge_0_then_la1 lda.z x+1 bpl __b7 // atan2_16::@21 // angle = 0x8000-angle // [94] atan2_16::angle#4 = $8000 - atan2_16::angle#1 -- vwuz1=vwuc1_minus_vwuz1 sec lda #<$8000 sbc.z angle sta.z angle lda #>$8000 sbc.z angle+1 sta.z angle+1 // [95] phi from atan2_16::@12 atan2_16::@21 to atan2_16::@7 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7] // [95] phi atan2_16::angle#11 = atan2_16::angle#1 [phi:atan2_16::@12/atan2_16::@21->atan2_16::@7#0] -- register_copy // atan2_16::@7 __b7: // if(y<0) // [96] if(atan2_16::y#0>=0) goto atan2_16::@8 -- vwsz1_ge_0_then_la1 lda.z y+1 bpl __b8 // atan2_16::@9 // angle = -angle // [97] atan2_16::angle#5 = - atan2_16::angle#11 -- vwuz1=_neg_vwuz1 sec lda #0 sbc.z angle sta.z angle lda #0 sbc.z angle+1 sta.z angle+1 // [98] phi from atan2_16::@7 atan2_16::@9 to atan2_16::@8 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8] // [98] phi atan2_16::return#0 = atan2_16::angle#11 [phi:atan2_16::@7/atan2_16::@9->atan2_16::@8#0] -- register_copy // atan2_16::@8 __b8: // atan2_16::@return // } // [99] return rts // atan2_16::@11 __b11: // [100] atan2_16::shift#5 = atan2_16::i#2 -- vbuyy=vbuxx txa tay // [101] atan2_16::xd#10 = atan2_16::xi#3 -- vwsz1=vwsz2 lda.z xi sta.z xd lda.z xi+1 sta.z xd+1 // [102] atan2_16::yd#10 = atan2_16::yi#3 -- vwsz1=vwsz2 lda.z yi sta.z yd lda.z yi+1 sta.z yd+1 // [103] phi from atan2_16::@11 atan2_16::@14 to atan2_16::@13 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13] // [103] phi atan2_16::yd#3 = atan2_16::yd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#0] -- register_copy // [103] phi atan2_16::xd#3 = atan2_16::xd#10 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#1] -- register_copy // [103] phi atan2_16::shift#2 = atan2_16::shift#5 [phi:atan2_16::@11/atan2_16::@14->atan2_16::@13#2] -- register_copy // atan2_16::@13 __b13: // while(shift>=2) // [104] if(atan2_16::shift#2>=2) goto atan2_16::@14 -- vbuyy_ge_vbuc1_then_la1 cpy #2 bcs __b14 // atan2_16::@15 // if(shift) // [105] if(0==atan2_16::shift#2) goto atan2_16::@17 -- 0_eq_vbuyy_then_la1 cpy #0 beq __b17 // atan2_16::@16 // xd >>= 1 // [106] atan2_16::xd#2 = atan2_16::xd#3 >> 1 -- vwsz1=vwsz1_ror_1 lda.z xd+1 cmp #$80 ror.z xd+1 ror.z xd // yd >>= 1 // [107] atan2_16::yd#2 = atan2_16::yd#3 >> 1 -- vwsz1=vwsz1_ror_1 lda.z yd+1 cmp #$80 ror.z yd+1 ror.z yd // [108] phi from atan2_16::@15 atan2_16::@16 to atan2_16::@17 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17] // [108] phi atan2_16::xd#5 = atan2_16::xd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#0] -- register_copy // [108] phi atan2_16::yd#5 = atan2_16::yd#3 [phi:atan2_16::@15/atan2_16::@16->atan2_16::@17#1] -- register_copy // atan2_16::@17 __b17: // if(yi>=0) // [109] if(atan2_16::yi#3>=0) goto atan2_16::@18 -- vwsz1_ge_0_then_la1 lda.z yi+1 bpl __b18 // atan2_16::@20 // xi -= yd // [110] atan2_16::xi#2 = atan2_16::xi#3 - atan2_16::yd#5 -- vwsz1=vwsz1_minus_vwsz2 lda.z xi sec sbc.z yd sta.z xi lda.z xi+1 sbc.z yd+1 sta.z xi+1 // yi += xd // [111] atan2_16::yi#2 = atan2_16::yi#3 + atan2_16::xd#5 -- vwsz1=vwsz1_plus_vwsz2 lda.z yi clc adc.z xd sta.z yi lda.z yi+1 adc.z xd+1 sta.z yi+1 // angle -= CORDIC_ATAN2_ANGLES_16[i] // [112] atan2_16::$23 = atan2_16::i#2 << 1 -- vbuaa=vbuxx_rol_1 txa asl // [113] atan2_16::angle#3 = atan2_16::angle#12 - CORDIC_ATAN2_ANGLES_16[atan2_16::$23] -- vwuz1=vwuz1_minus_pwuc1_derefidx_vbuaa tay sec lda.z angle sbc CORDIC_ATAN2_ANGLES_16,y sta.z angle lda.z angle+1 sbc CORDIC_ATAN2_ANGLES_16+1,y sta.z angle+1 // [114] phi from atan2_16::@18 atan2_16::@20 to atan2_16::@19 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19] // [114] phi atan2_16::xi#8 = atan2_16::xi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#0] -- register_copy // [114] phi atan2_16::angle#13 = atan2_16::angle#2 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#1] -- register_copy // [114] phi atan2_16::yi#8 = atan2_16::yi#1 [phi:atan2_16::@18/atan2_16::@20->atan2_16::@19#2] -- register_copy // atan2_16::@19 __b19: // for( char i: 0..CORDIC_ITERATIONS_16-1) // [115] atan2_16::i#1 = ++ atan2_16::i#2 -- vbuxx=_inc_vbuxx inx // [116] if(atan2_16::i#1==CORDIC_ITERATIONS_16-1+1) goto atan2_16::@12 -- vbuxx_eq_vbuc1_then_la1 cpx #CORDIC_ITERATIONS_16-1+1 bne !__b12+ jmp __b12 !__b12: // [89] phi from atan2_16::@19 to atan2_16::@10 [phi:atan2_16::@19->atan2_16::@10] // [89] phi atan2_16::angle#12 = atan2_16::angle#13 [phi:atan2_16::@19->atan2_16::@10#0] -- register_copy // [89] phi atan2_16::i#2 = atan2_16::i#1 [phi:atan2_16::@19->atan2_16::@10#1] -- register_copy // [89] phi atan2_16::xi#3 = atan2_16::xi#8 [phi:atan2_16::@19->atan2_16::@10#2] -- register_copy // [89] phi atan2_16::yi#3 = atan2_16::yi#8 [phi:atan2_16::@19->atan2_16::@10#3] -- register_copy jmp __b10 // atan2_16::@18 __b18: // xi += yd // [117] atan2_16::xi#1 = atan2_16::xi#3 + atan2_16::yd#5 -- vwsz1=vwsz1_plus_vwsz2 lda.z xi clc adc.z yd sta.z xi lda.z xi+1 adc.z yd+1 sta.z xi+1 // yi -= xd // [118] atan2_16::yi#1 = atan2_16::yi#3 - atan2_16::xd#5 -- vwsz1=vwsz1_minus_vwsz2 lda.z yi sec sbc.z xd sta.z yi lda.z yi+1 sbc.z xd+1 sta.z yi+1 // angle += CORDIC_ATAN2_ANGLES_16[i] // [119] atan2_16::$22 = atan2_16::i#2 << 1 -- vbuaa=vbuxx_rol_1 txa asl // [120] atan2_16::angle#2 = atan2_16::angle#12 + CORDIC_ATAN2_ANGLES_16[atan2_16::$22] -- vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa tay clc lda.z angle adc CORDIC_ATAN2_ANGLES_16,y sta.z angle lda.z angle+1 adc CORDIC_ATAN2_ANGLES_16+1,y sta.z angle+1 jmp __b19 // atan2_16::@14 __b14: // xd >>= 2 // [121] atan2_16::xd#1 = atan2_16::xd#3 >> 2 -- vwsz1=vwsz1_ror_2 lda.z xd+1 cmp #$80 ror.z xd+1 ror.z xd lda.z xd+1 cmp #$80 ror.z xd+1 ror.z xd // yd >>= 2 // [122] atan2_16::yd#1 = atan2_16::yd#3 >> 2 -- vwsz1=vwsz1_ror_2 lda.z yd+1 cmp #$80 ror.z yd+1 ror.z yd lda.z yd+1 cmp #$80 ror.z yd+1 ror.z yd // shift -=2 // [123] atan2_16::shift#1 = atan2_16::shift#2 - 2 -- vbuyy=vbuyy_minus_2 dey dey jmp __b13 // atan2_16::@4 __b4: // (x>=0)?x:-x // [124] atan2_16::xi#13 = atan2_16::x#0 -- vwsz1=vwsz2 lda.z x sta.z xi lda.z x+1 sta.z xi+1 jmp __b6 // atan2_16::@1 __b1: // (y>=0)?y:-y // [125] atan2_16::yi#16 = atan2_16::y#0 -- vwsz1=vwsz2 lda.z y sta.z yi lda.z y+1 sta.z yi+1 jmp __b3 } // print_uint_at // Print a unsigned int as HEX at a specific position // print_uint_at(word zp($d) w, byte* zp($f) at) print_uint_at: { .label w = $d .label at = $f // print_uchar_at(>w, at) // [127] print_uchar_at::b#0 = > print_uint_at::w#2 -- vbuz1=_hi_vwuz2 lda.z w+1 sta.z print_uchar_at.b // [128] print_uchar_at::at#0 = print_uint_at::at#2 // [129] call print_uchar_at // [134] phi from print_uint_at to print_uchar_at [phi:print_uint_at->print_uchar_at] // [134] phi print_uchar_at::at#2 = print_uchar_at::at#0 [phi:print_uint_at->print_uchar_at#0] -- register_copy // [134] phi print_uchar_at::b#2 = print_uchar_at::b#0 [phi:print_uint_at->print_uchar_at#1] -- register_copy jsr print_uchar_at // print_uint_at::@1 // print_uchar_at(print_uchar_at] // [134] phi print_uchar_at::at#2 = print_uchar_at::at#1 [phi:print_uint_at::@1->print_uchar_at#0] -- register_copy // [134] phi print_uchar_at::b#2 = print_uchar_at::b#1 [phi:print_uint_at::@1->print_uchar_at#1] -- register_copy jsr print_uchar_at // print_uint_at::@return // } // [133] return rts } // print_uchar_at // Print a char as HEX at a specific position // print_uchar_at(byte zp($1b) b, byte* zp($f) at) print_uchar_at: { .label b = $1b .label at = $f // b>>4 // [135] print_uchar_at::$0 = print_uchar_at::b#2 >> 4 -- vbuaa=vbuz1_ror_4 lda.z b lsr lsr lsr lsr // print_char_at(print_hextab[b>>4], at) // [136] print_char_at::ch#0 = print_hextab[print_uchar_at::$0] -- vbuxx=pbuc1_derefidx_vbuaa tay ldx print_hextab,y // [137] print_char_at::at#0 = print_uchar_at::at#2 -- pbuz1=pbuz2 lda.z at sta.z print_char_at.at lda.z at+1 sta.z print_char_at.at+1 // [138] call print_char_at // Table of hexadecimal digits // [144] phi from print_uchar_at to print_char_at [phi:print_uchar_at->print_char_at] // [144] phi print_char_at::at#2 = print_char_at::at#0 [phi:print_uchar_at->print_char_at#0] -- register_copy // [144] phi print_char_at::ch#2 = print_char_at::ch#0 [phi:print_uchar_at->print_char_at#1] -- register_copy jsr print_char_at // print_uchar_at::@1 // b&$f // [139] print_uchar_at::$2 = print_uchar_at::b#2 & $f -- vbuyy=vbuz1_band_vbuc1 lda #$f and.z b tay // print_char_at(print_hextab[b&$f], at+1) // [140] print_char_at::at#1 = print_uchar_at::at#2 + 1 -- pbuz1=pbuz2_plus_1 clc lda.z at adc #1 sta.z print_char_at.at lda.z at+1 adc #0 sta.z print_char_at.at+1 // [141] print_char_at::ch#1 = print_hextab[print_uchar_at::$2] -- vbuxx=pbuc1_derefidx_vbuyy ldx print_hextab,y // [142] call print_char_at // [144] phi from print_uchar_at::@1 to print_char_at [phi:print_uchar_at::@1->print_char_at] // [144] phi print_char_at::at#2 = print_char_at::at#1 [phi:print_uchar_at::@1->print_char_at#0] -- register_copy // [144] phi print_char_at::ch#2 = print_char_at::ch#1 [phi:print_uchar_at::@1->print_char_at#1] -- register_copy jsr print_char_at // print_uchar_at::@return // } // [143] return rts } // print_char_at // Print a single char // print_char_at(byte register(X) ch, byte* zp($11) at) print_char_at: { .label at = $11 // *(at) = ch // [145] *print_char_at::at#2 = print_char_at::ch#2 -- _deref_pbuz1=vbuxx txa ldy #0 sta (at),y // print_char_at::@return // } // [146] return rts } // File Data .segment Data // Bit patterns for symbols 0-f (3x5 pixels) used in font hex FONT_HEX_PROTO: .byte 2, 5, 5, 5, 2, 6, 2, 2, 2, 7, 6, 1, 2, 4, 7, 6, 1, 2, 1, 6, 5, 5, 7, 1, 1, 7, 4, 6, 1, 6, 3, 4, 6, 5, 2, 7, 1, 1, 1, 1, 2, 5, 2, 5, 2, 2, 5, 3, 1, 1, 2, 5, 7, 5, 5, 6, 5, 6, 5, 6, 2, 5, 4, 5, 2, 6, 5, 5, 5, 6, 7, 4, 6, 4, 7, 7, 4, 6, 4, 4 // Angles representing ATAN(0.5), ATAN(0.25), ATAN(0.125), ... CORDIC_ATAN2_ANGLES_16: .for (var i=0; i