diff --git a/src/main/java/dk/camelot64/kickc/Compiler.java b/src/main/java/dk/camelot64/kickc/Compiler.java index 6ec8258c2..bb7ae0831 100644 --- a/src/main/java/dk/camelot64/kickc/Compiler.java +++ b/src/main/java/dk/camelot64/kickc/Compiler.java @@ -311,14 +311,14 @@ public class Compiler { // Attempt uplifting registers through a lot of combinations //getLog().setVerboseUplift(true); - new Pass4RegisterUpliftCombinations(program).performUplift(1_000); + new Pass4RegisterUpliftCombinations(program).performUplift(100); //getLog().setVerboseUplift(true); //new Pass4RegisterUpliftStatic(program).performUplift(); //getLog().setVerboseUplift(false); // Attempt uplifting registers one at a time to catch remaining potential not realized by combination search - new Pass4RegisterUpliftRemains(program).performUplift(1_000); + new Pass4RegisterUpliftRemains(program).performUplift(100); // Final register coalesce and finalization new Pass4ZeroPageCoalesceAssignment(program).coalesce(); diff --git a/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log b/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log index 9535a49eb..b8cdb020a 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/bitmap-bresenham.log @@ -5985,64 +5985,72 @@ Uplift Scope [] Uplifting [bitmap_plot] best 316487 combination reg byte y [ bitmap_plot::y#4 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#3 bitmap_plot::y#2 ] reg byte x [ bitmap_plot::x#4 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#3 bitmap_plot::x#2 ] zp ZP_WORD:53 [ bitmap_plot::plotter_y#0 ] reg byte a [ bitmap_plot::$1 ] zp ZP_WORD:51 [ bitmap_plot::plotter_x#0 ] zp ZP_WORD:55 [ bitmap_plot::$0 ] Uplifting [bitmap_line_xdyi] best 307481 combination zp ZP_BYTE:16 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] zp ZP_BYTE:15 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] zp ZP_BYTE:58 [ bitmap_line_xdyi::$6 ] reg byte x [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] zp ZP_BYTE:12 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] zp ZP_BYTE:11 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] zp ZP_BYTE:13 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] +Limited combination testing to 100 combinations of 256 possible. Uplifting [bitmap_line_xdyd] best 298475 combination zp ZP_BYTE:28 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] zp ZP_BYTE:27 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] zp ZP_BYTE:60 [ bitmap_line_xdyd::$6 ] reg byte x [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] zp ZP_BYTE:24 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] zp ZP_BYTE:23 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] zp ZP_BYTE:25 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] +Limited combination testing to 100 combinations of 256 possible. Uplifting [bitmap_line_ydxi] best 286469 combination zp ZP_BYTE:8 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] reg byte x [ bitmap_line_ydxi::x#3 bitmap_line_ydxi::x#5 bitmap_line_ydxi::x#1 bitmap_line_ydxi::x#0 bitmap_line_ydxi::x#6 bitmap_line_ydxi::x#2 ] reg byte y [ bitmap_line_ydxi::$6 ] zp ZP_BYTE:7 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] zp ZP_BYTE:4 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] zp ZP_BYTE:3 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] zp ZP_BYTE:5 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] +Limited combination testing to 100 combinations of 256 possible. Uplifting [bitmap_line_ydxd] best 274463 combination zp ZP_BYTE:22 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] reg byte x [ bitmap_line_ydxd::x#3 bitmap_line_ydxd::x#5 bitmap_line_ydxd::x#1 bitmap_line_ydxd::x#0 bitmap_line_ydxd::x#6 bitmap_line_ydxd::x#2 ] reg byte y [ bitmap_line_ydxd::$6 ] zp ZP_BYTE:21 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#3 ] zp ZP_BYTE:18 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#1 bitmap_line_ydxd::yd#0 ] zp ZP_BYTE:17 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#1 bitmap_line_ydxd::xd#0 ] zp ZP_BYTE:19 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#1 bitmap_line_ydxd::y1#0 ] +Limited combination testing to 100 combinations of 256 possible. Uplifting [bitmap_clear] best 273563 combination zp ZP_WORD:32 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] reg byte x [ bitmap_clear::x#2 bitmap_clear::x#1 ] zp ZP_BYTE:31 [ bitmap_clear::y#4 bitmap_clear::y#1 ] zp ZP_WORD:61 [ bitmap_clear::$3 ] Uplifting [lines] best 273563 combination zp ZP_BYTE:2 [ lines::l#2 lines::l#1 ] -Uplifting [bitmap_init] best 272993 combination zp ZP_WORD:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte y [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$0 ] reg byte a [ bitmap_init::$7 ] reg byte a [ bitmap_init::$8 ] zp ZP_BYTE:67 [ bitmap_init::$9 ] zp ZP_BYTE:68 [ bitmap_init::$10 ] zp ZP_BYTE:64 [ bitmap_init::$6 ] -Limited combination testing to 1000 combinations of 138240 possible. -Uplifting [init_screen] best 272993 combination zp ZP_WORD:29 [ init_screen::c#2 init_screen::c#1 ] -Uplifting [bitmap_line] best 272681 combination reg byte y [ bitmap_line::y1#0 ] zp ZP_BYTE:42 [ bitmap_line::y0#0 ] zp ZP_BYTE:41 [ bitmap_line::x1#0 ] zp ZP_BYTE:40 [ bitmap_line::x0#0 ] zp ZP_BYTE:45 [ bitmap_line::yd#1 ] zp ZP_BYTE:46 [ bitmap_line::yd#0 ] zp ZP_BYTE:48 [ bitmap_line::yd#3 ] zp ZP_BYTE:49 [ bitmap_line::yd#10 ] zp ZP_BYTE:44 [ bitmap_line::xd#1 ] zp ZP_BYTE:47 [ bitmap_line::xd#0 ] -Limited combination testing to 1000 combinations of 186624 possible. -Uplifting [main] best 272681 combination -Uplifting [] best 272681 combination +Uplifting [bitmap_init] best 273113 combination zp ZP_WORD:38 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte y [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$0 ] zp ZP_BYTE:65 [ bitmap_init::$7 ] zp ZP_BYTE:66 [ bitmap_init::$8 ] zp ZP_BYTE:67 [ bitmap_init::$9 ] zp ZP_BYTE:68 [ bitmap_init::$10 ] zp ZP_BYTE:64 [ bitmap_init::$6 ] +Limited combination testing to 100 combinations of 138240 possible. +Uplifting [init_screen] best 273113 combination zp ZP_WORD:29 [ init_screen::c#2 init_screen::c#1 ] +Uplifting [bitmap_line] best 272801 combination reg byte y [ bitmap_line::y1#0 ] zp ZP_BYTE:42 [ bitmap_line::y0#0 ] zp ZP_BYTE:41 [ bitmap_line::x1#0 ] zp ZP_BYTE:40 [ bitmap_line::x0#0 ] zp ZP_BYTE:45 [ bitmap_line::yd#1 ] zp ZP_BYTE:46 [ bitmap_line::yd#0 ] zp ZP_BYTE:48 [ bitmap_line::yd#3 ] zp ZP_BYTE:49 [ bitmap_line::yd#10 ] zp ZP_BYTE:44 [ bitmap_line::xd#1 ] zp ZP_BYTE:47 [ bitmap_line::xd#0 ] +Limited combination testing to 100 combinations of 186624 possible. +Uplifting [main] best 272801 combination +Uplifting [] best 272801 combination Attempting to uplift remaining variables inzp ZP_BYTE:8 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] -Uplifting [bitmap_line_ydxi] best 272681 combination zp ZP_BYTE:8 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] +Uplifting [bitmap_line_ydxi] best 272801 combination zp ZP_BYTE:8 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:16 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] -Uplifting [bitmap_line_xdyi] best 272681 combination zp ZP_BYTE:16 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] +Uplifting [bitmap_line_xdyi] best 272801 combination zp ZP_BYTE:16 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:22 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] -Uplifting [bitmap_line_ydxd] best 272681 combination zp ZP_BYTE:22 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] +Uplifting [bitmap_line_ydxd] best 272801 combination zp ZP_BYTE:22 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:28 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] -Uplifting [bitmap_line_xdyd] best 272681 combination zp ZP_BYTE:28 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] +Uplifting [bitmap_line_xdyd] best 272801 combination zp ZP_BYTE:28 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:15 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] -Uplifting [bitmap_line_xdyi] best 272681 combination zp ZP_BYTE:15 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] +Uplifting [bitmap_line_xdyi] best 272801 combination zp ZP_BYTE:15 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:27 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] -Uplifting [bitmap_line_xdyd] best 272681 combination zp ZP_BYTE:27 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] +Uplifting [bitmap_line_xdyd] best 272801 combination zp ZP_BYTE:27 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:58 [ bitmap_line_xdyi::$6 ] -Uplifting [bitmap_line_xdyi] best 272681 combination zp ZP_BYTE:58 [ bitmap_line_xdyi::$6 ] +Uplifting [bitmap_line_xdyi] best 272801 combination zp ZP_BYTE:58 [ bitmap_line_xdyi::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:60 [ bitmap_line_xdyd::$6 ] -Uplifting [bitmap_line_xdyd] best 272681 combination zp ZP_BYTE:60 [ bitmap_line_xdyd::$6 ] +Uplifting [bitmap_line_xdyd] best 272801 combination zp ZP_BYTE:60 [ bitmap_line_xdyd::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:7 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] -Uplifting [bitmap_line_ydxi] best 272681 combination zp ZP_BYTE:7 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] +Uplifting [bitmap_line_ydxi] best 272801 combination zp ZP_BYTE:7 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:21 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#3 ] -Uplifting [bitmap_line_ydxd] best 272681 combination zp ZP_BYTE:21 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#3 ] +Uplifting [bitmap_line_ydxd] best 272801 combination zp ZP_BYTE:21 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:2 [ lines::l#2 lines::l#1 ] -Uplifting [lines] best 272681 combination zp ZP_BYTE:2 [ lines::l#2 lines::l#1 ] +Uplifting [lines] best 272801 combination zp ZP_BYTE:2 [ lines::l#2 lines::l#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:4 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] -Uplifting [bitmap_line_ydxi] best 272681 combination zp ZP_BYTE:4 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] +Uplifting [bitmap_line_ydxi] best 272801 combination zp ZP_BYTE:4 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:12 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] -Uplifting [bitmap_line_xdyi] best 272681 combination zp ZP_BYTE:12 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] +Uplifting [bitmap_line_xdyi] best 272801 combination zp ZP_BYTE:12 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:18 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#1 bitmap_line_ydxd::yd#0 ] -Uplifting [bitmap_line_ydxd] best 272681 combination zp ZP_BYTE:18 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#1 bitmap_line_ydxd::yd#0 ] +Uplifting [bitmap_line_ydxd] best 272801 combination zp ZP_BYTE:18 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#1 bitmap_line_ydxd::yd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:24 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] -Uplifting [bitmap_line_xdyd] best 272681 combination zp ZP_BYTE:24 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] +Uplifting [bitmap_line_xdyd] best 272801 combination zp ZP_BYTE:24 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:3 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] -Uplifting [bitmap_line_ydxi] best 272681 combination zp ZP_BYTE:3 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] +Uplifting [bitmap_line_ydxi] best 272801 combination zp ZP_BYTE:3 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:11 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] -Uplifting [bitmap_line_xdyi] best 272681 combination zp ZP_BYTE:11 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] +Uplifting [bitmap_line_xdyi] best 272801 combination zp ZP_BYTE:11 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:17 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#1 bitmap_line_ydxd::xd#0 ] -Uplifting [bitmap_line_ydxd] best 272681 combination zp ZP_BYTE:17 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#1 bitmap_line_ydxd::xd#0 ] +Uplifting [bitmap_line_ydxd] best 272801 combination zp ZP_BYTE:17 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#1 bitmap_line_ydxd::xd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:23 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] -Uplifting [bitmap_line_xdyd] best 272681 combination zp ZP_BYTE:23 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] +Uplifting [bitmap_line_xdyd] best 272801 combination zp ZP_BYTE:23 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:5 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] -Uplifting [bitmap_line_ydxi] best 272681 combination zp ZP_BYTE:5 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] +Uplifting [bitmap_line_ydxi] best 272801 combination zp ZP_BYTE:5 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:13 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] -Uplifting [bitmap_line_xdyi] best 272681 combination zp ZP_BYTE:13 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] +Uplifting [bitmap_line_xdyi] best 272801 combination zp ZP_BYTE:13 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:19 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#1 bitmap_line_ydxd::y1#0 ] -Uplifting [bitmap_line_ydxd] best 272681 combination zp ZP_BYTE:19 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#1 bitmap_line_ydxd::y1#0 ] +Uplifting [bitmap_line_ydxd] best 272801 combination zp ZP_BYTE:19 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#1 bitmap_line_ydxd::y1#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:25 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] -Uplifting [bitmap_line_xdyd] best 272681 combination zp ZP_BYTE:25 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] +Uplifting [bitmap_line_xdyd] best 272801 combination zp ZP_BYTE:25 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:65 [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 272741 combination reg byte a [ bitmap_init::$7 ] +Attempting to uplift remaining variables inzp ZP_BYTE:66 [ bitmap_init::$8 ] +Uplifting [bitmap_init] best 272681 combination reg byte a [ bitmap_init::$8 ] Attempting to uplift remaining variables inzp ZP_BYTE:67 [ bitmap_init::$9 ] Uplifting [bitmap_init] best 272621 combination reg byte a [ bitmap_init::$9 ] Attempting to uplift remaining variables inzp ZP_BYTE:68 [ bitmap_init::$10 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log b/src/test/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log index 675013581..92b43705b 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/bitmap-plotter.log @@ -2251,23 +2251,31 @@ Uplift Scope [main] Uplift Scope [] Uplifting [plots] best 8971 combination reg byte x [ plots::i#2 plots::i#1 ] -Uplifting [init_plot_tables] best 8401 combination zp ZP_WORD:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] reg byte y [ init_plot_tables::bits#3 init_plot_tables::bits#4 init_plot_tables::bits#1 ] reg byte x [ init_plot_tables::x#2 init_plot_tables::x#1 ] reg byte x [ init_plot_tables::y#2 init_plot_tables::y#1 ] reg byte a [ init_plot_tables::$0 ] reg byte a [ init_plot_tables::$7 ] reg byte a [ init_plot_tables::$8 ] zp ZP_BYTE:33 [ init_plot_tables::$9 ] zp ZP_BYTE:34 [ init_plot_tables::$10 ] zp ZP_BYTE:30 [ init_plot_tables::$6 ] -Limited combination testing to 1000 combinations of 138240 possible. -Uplifting [init_screen] best 8401 combination zp ZP_WORD:8 [ init_screen::b#2 init_screen::b#1 ] zp ZP_WORD:10 [ init_screen::c#2 init_screen::c#1 ] -Uplifting [plot] best 8377 combination zp ZP_BYTE:13 [ plot::y#0 ] zp ZP_BYTE:12 [ plot::x#0 ] reg byte a [ plot::$6 ] reg byte a [ plot::$7 ] reg byte a [ plot::$8 ] reg byte a [ plot::$9 ] zp ZP_WORD:24 [ plot::plotter_y#2 ] zp ZP_BYTE:28 [ plot::$5 ] zp ZP_WORD:26 [ plot::plotter#0 ] zp ZP_WORD:15 [ plot::plotter_x#1 ] zp ZP_WORD:21 [ plot::plotter_y#1 ] zp ZP_WORD:18 [ plot::plotter_x#2 ] -Limited combination testing to 1000 combinations of 9216 possible. -Uplifting [main] best 8377 combination -Uplifting [] best 8377 combination +Uplifting [init_plot_tables] best 8521 combination zp ZP_WORD:6 [ init_plot_tables::yoffs#2 init_plot_tables::yoffs#4 init_plot_tables::yoffs#1 ] reg byte y [ init_plot_tables::bits#3 init_plot_tables::bits#4 init_plot_tables::bits#1 ] reg byte x [ init_plot_tables::x#2 init_plot_tables::x#1 ] reg byte x [ init_plot_tables::y#2 init_plot_tables::y#1 ] reg byte a [ init_plot_tables::$0 ] zp ZP_BYTE:31 [ init_plot_tables::$7 ] zp ZP_BYTE:32 [ init_plot_tables::$8 ] zp ZP_BYTE:33 [ init_plot_tables::$9 ] zp ZP_BYTE:34 [ init_plot_tables::$10 ] zp ZP_BYTE:30 [ init_plot_tables::$6 ] +Limited combination testing to 100 combinations of 138240 possible. +Uplifting [init_screen] best 8521 combination zp ZP_WORD:8 [ init_screen::b#2 init_screen::b#1 ] zp ZP_WORD:10 [ init_screen::c#2 init_screen::c#1 ] +Uplifting [plot] best 8509 combination zp ZP_BYTE:13 [ plot::y#0 ] zp ZP_BYTE:12 [ plot::x#0 ] reg byte a [ plot::$6 ] reg byte a [ plot::$7 ] zp ZP_BYTE:20 [ plot::$8 ] zp ZP_BYTE:23 [ plot::$9 ] zp ZP_WORD:24 [ plot::plotter_y#2 ] zp ZP_BYTE:28 [ plot::$5 ] zp ZP_WORD:26 [ plot::plotter#0 ] zp ZP_WORD:15 [ plot::plotter_x#1 ] zp ZP_WORD:21 [ plot::plotter_y#1 ] zp ZP_WORD:18 [ plot::plotter_x#2 ] +Limited combination testing to 100 combinations of 9216 possible. +Uplifting [main] best 8509 combination +Uplifting [] best 8509 combination +Attempting to uplift remaining variables inzp ZP_BYTE:31 [ init_plot_tables::$7 ] +Uplifting [init_plot_tables] best 8449 combination reg byte a [ init_plot_tables::$7 ] +Attempting to uplift remaining variables inzp ZP_BYTE:32 [ init_plot_tables::$8 ] +Uplifting [init_plot_tables] best 8389 combination reg byte a [ init_plot_tables::$8 ] Attempting to uplift remaining variables inzp ZP_BYTE:33 [ init_plot_tables::$9 ] -Uplifting [init_plot_tables] best 8317 combination reg byte a [ init_plot_tables::$9 ] +Uplifting [init_plot_tables] best 8329 combination reg byte a [ init_plot_tables::$9 ] Attempting to uplift remaining variables inzp ZP_BYTE:34 [ init_plot_tables::$10 ] -Uplifting [init_plot_tables] best 8257 combination reg byte a [ init_plot_tables::$10 ] +Uplifting [init_plot_tables] best 8269 combination reg byte a [ init_plot_tables::$10 ] Attempting to uplift remaining variables inzp ZP_BYTE:13 [ plot::y#0 ] -Uplifting [plot] best 8257 combination zp ZP_BYTE:13 [ plot::y#0 ] +Uplifting [plot] best 8269 combination zp ZP_BYTE:13 [ plot::y#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:30 [ init_plot_tables::$6 ] -Uplifting [init_plot_tables] best 8257 combination zp ZP_BYTE:30 [ init_plot_tables::$6 ] +Uplifting [init_plot_tables] best 8269 combination zp ZP_BYTE:30 [ init_plot_tables::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:12 [ plot::x#0 ] -Uplifting [plot] best 8257 combination zp ZP_BYTE:12 [ plot::x#0 ] +Uplifting [plot] best 8269 combination zp ZP_BYTE:12 [ plot::x#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:20 [ plot::$8 ] +Uplifting [plot] best 8263 combination reg byte a [ plot::$8 ] +Attempting to uplift remaining variables inzp ZP_BYTE:23 [ plot::$9 ] +Uplifting [plot] best 8257 combination reg byte a [ plot::$9 ] Attempting to uplift remaining variables inzp ZP_BYTE:28 [ plot::$5 ] Uplifting [plot] best 8251 combination reg byte a [ plot::$5 ] Coalescing zero page register with common assignment [ zp ZP_WORD:15 [ plot::plotter_x#1 ] ] with [ zp ZP_WORD:18 [ plot::plotter_x#2 ] ] - score: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-gfxmodes.log b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-gfxmodes.log index 873533f0f..ec1173dd9 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-gfxmodes.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/c64dtv-gfxmodes.log @@ -27540,264 +27540,310 @@ Uplift Scope [print_ln] Uplift Scope [print_set_screen] Uplift Scope [main] -Uplifting [mode_8bpppixelcell] best 3145484 combination reg byte a [ mode_8bpppixelcell::c#2 mode_8bpppixelcell::c#3 ] reg byte a [ mode_8bpppixelcell::$19 ] reg byte x [ mode_8bpppixelcell::cp#2 mode_8bpppixelcell::cp#1 ] zp ZP_BYTE:25 [ mode_8bpppixelcell::bits#2 mode_8bpppixelcell::bits#0 mode_8bpppixelcell::bits#1 ] zp ZP_WORD:26 [ mode_8bpppixelcell::gfxb#2 mode_8bpppixelcell::gfxb#5 mode_8bpppixelcell::gfxb#7 mode_8bpppixelcell::gfxb#1 ] zp ZP_BYTE:28 [ mode_8bpppixelcell::col#2 mode_8bpppixelcell::col#5 mode_8bpppixelcell::col#7 mode_8bpppixelcell::col#1 ] reg byte a [ mode_8bpppixelcell::$13 ] reg byte a [ mode_8bpppixelcell::$15 ] zp ZP_BYTE:214 [ mode_8bpppixelcell::$16 ] zp ZP_BYTE:18 [ mode_8bpppixelcell::ax#2 mode_8bpppixelcell::ax#1 ] zp ZP_WORD:22 [ mode_8bpppixelcell::chargen#2 mode_8bpppixelcell::chargen#4 mode_8bpppixelcell::chargen#1 ] zp ZP_BYTE:24 [ mode_8bpppixelcell::cr#6 mode_8bpppixelcell::cr#1 ] zp ZP_WORD:19 [ mode_8bpppixelcell::gfxa#2 mode_8bpppixelcell::gfxa#3 mode_8bpppixelcell::gfxa#1 ] zp ZP_BYTE:212 [ mode_8bpppixelcell::$14 ] zp ZP_BYTE:16 [ mode_8bpppixelcell::i#2 mode_8bpppixelcell::i#1 ] zp ZP_BYTE:17 [ mode_8bpppixelcell::ay#4 mode_8bpppixelcell::ay#1 ] zp ZP_BYTE:21 [ mode_8bpppixelcell::ch#8 mode_8bpppixelcell::ch#1 ] -Limited combination testing to 1000 combinations of 1572864 possible. -Uplifting [mode_twoplanebitmap] best 3104484 combination zp ZP_WORD:50 [ mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::gfxa#6 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::gfxa#2 mode_twoplanebitmap::gfxa#1 ] zp ZP_WORD:54 [ mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::gfxb#1 ] reg byte x [ mode_twoplanebitmap::bx#2 mode_twoplanebitmap::bx#1 ] reg byte a [ mode_twoplanebitmap::$15 ] reg byte a [ mode_twoplanebitmap::$17 ] reg byte a [ mode_twoplanebitmap::$18 ] reg byte a [ mode_twoplanebitmap::$21 ] reg byte x [ mode_twoplanebitmap::cx#2 mode_twoplanebitmap::cx#1 ] zp ZP_BYTE:52 [ mode_twoplanebitmap::ax#2 mode_twoplanebitmap::ax#1 ] zp ZP_WORD:47 [ mode_twoplanebitmap::col#2 mode_twoplanebitmap::col#3 mode_twoplanebitmap::col#1 ] zp ZP_BYTE:221 [ mode_twoplanebitmap::$16 ] zp ZP_BYTE:44 [ mode_twoplanebitmap::i#2 mode_twoplanebitmap::i#1 ] zp ZP_BYTE:45 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cy#1 ] zp ZP_BYTE:49 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ay#1 ] zp ZP_BYTE:53 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::by#1 ] -Limited combination testing to 1000 combinations of 196608 possible. -Uplifting [mode_sixsfred2] best 3067484 combination zp ZP_WORD:67 [ mode_sixsfred2::gfxb#2 mode_sixsfred2::gfxb#3 mode_sixsfred2::gfxb#1 ] reg byte x [ mode_sixsfred2::bx#2 mode_sixsfred2::bx#1 ] reg byte a [ mode_sixsfred2::$14 ] reg byte a [ mode_sixsfred2::$16 ] reg byte a [ mode_sixsfred2::$17 ] reg byte a [ mode_sixsfred2::$20 ] reg byte a [ mode_sixsfred2::row#0 ] zp ZP_BYTE:59 [ mode_sixsfred2::cx#2 mode_sixsfred2::cx#1 ] zp ZP_BYTE:65 [ mode_sixsfred2::ax#2 mode_sixsfred2::ax#1 ] zp ZP_WORD:63 [ mode_sixsfred2::gfxa#2 mode_sixsfred2::gfxa#3 mode_sixsfred2::gfxa#1 ] zp ZP_WORD:60 [ mode_sixsfred2::col#2 mode_sixsfred2::col#3 mode_sixsfred2::col#1 ] zp ZP_BYTE:226 [ mode_sixsfred2::$15 ] zp ZP_BYTE:57 [ mode_sixsfred2::i#2 mode_sixsfred2::i#1 ] zp ZP_BYTE:62 [ mode_sixsfred2::ay#4 mode_sixsfred2::ay#1 ] zp ZP_BYTE:58 [ mode_sixsfred2::cy#4 mode_sixsfred2::cy#1 ] zp ZP_BYTE:66 [ mode_sixsfred2::by#4 mode_sixsfred2::by#1 ] -Limited combination testing to 1000 combinations of 786432 possible. -Uplifting [mode_sixsfred] best 3026484 combination zp ZP_WORD:41 [ mode_sixsfred::gfxb#2 mode_sixsfred::gfxb#3 mode_sixsfred::gfxb#1 ] reg byte x [ mode_sixsfred::bx#2 mode_sixsfred::bx#1 ] reg byte x [ mode_sixsfred::cx#2 mode_sixsfred::cx#1 ] reg byte a [ mode_sixsfred::$16 ] reg byte a [ mode_sixsfred::$17 ] reg byte a [ mode_sixsfred::$20 ] reg byte a [ mode_sixsfred::row#0 ] zp ZP_BYTE:39 [ mode_sixsfred::ax#2 mode_sixsfred::ax#1 ] zp ZP_WORD:34 [ mode_sixsfred::col#2 mode_sixsfred::col#3 mode_sixsfred::col#1 ] zp ZP_WORD:37 [ mode_sixsfred::gfxa#2 mode_sixsfred::gfxa#3 mode_sixsfred::gfxa#1 ] zp ZP_BYTE:31 [ mode_sixsfred::i#2 mode_sixsfred::i#1 ] zp ZP_BYTE:32 [ mode_sixsfred::cy#4 mode_sixsfred::cy#1 ] zp ZP_BYTE:36 [ mode_sixsfred::ay#4 mode_sixsfred::ay#1 ] zp ZP_BYTE:40 [ mode_sixsfred::by#4 mode_sixsfred::by#1 ] -Limited combination testing to 1000 combinations of 65536 possible. -Uplifting [mode_stdchar] best 2996484 combination reg byte a [ mode_stdchar::$24 ] reg byte a [ mode_stdchar::$25 ] reg byte a [ mode_stdchar::$26 ] reg byte a [ mode_stdchar::$28 ] reg byte a [ mode_stdchar::$29 ] zp ZP_BYTE:148 [ mode_stdchar::cx#2 mode_stdchar::cx#1 ] zp ZP_WORD:149 [ mode_stdchar::col#2 mode_stdchar::col#3 mode_stdchar::col#1 ] zp ZP_BYTE:292 [ mode_stdchar::$27 ] zp ZP_WORD:151 [ mode_stdchar::ch#2 mode_stdchar::ch#3 mode_stdchar::ch#1 ] zp ZP_BYTE:146 [ mode_stdchar::i#2 mode_stdchar::i#1 ] zp ZP_BYTE:147 [ mode_stdchar::cy#4 mode_stdchar::cy#1 ] -Limited combination testing to 1000 combinations of 36864 possible. -Uplifting [mode_ecmchar] best 2966484 combination reg byte a [ mode_ecmchar::$25 ] reg byte a [ mode_ecmchar::$26 ] reg byte a [ mode_ecmchar::$27 ] reg byte a [ mode_ecmchar::$29 ] reg byte a [ mode_ecmchar::$30 ] zp ZP_BYTE:141 [ mode_ecmchar::cx#2 mode_ecmchar::cx#1 ] zp ZP_WORD:142 [ mode_ecmchar::col#2 mode_ecmchar::col#3 mode_ecmchar::col#1 ] zp ZP_BYTE:286 [ mode_ecmchar::$28 ] zp ZP_WORD:144 [ mode_ecmchar::ch#2 mode_ecmchar::ch#3 mode_ecmchar::ch#1 ] zp ZP_BYTE:139 [ mode_ecmchar::i#2 mode_ecmchar::i#1 ] zp ZP_BYTE:140 [ mode_ecmchar::cy#4 mode_ecmchar::cy#1 ] -Limited combination testing to 1000 combinations of 36864 possible. -Uplifting [mode_mcchar] best 2936484 combination reg byte a [ mode_mcchar::$25 ] reg byte a [ mode_mcchar::$26 ] reg byte a [ mode_mcchar::$27 ] reg byte a [ mode_mcchar::$29 ] reg byte a [ mode_mcchar::$30 ] zp ZP_BYTE:134 [ mode_mcchar::cx#2 mode_mcchar::cx#1 ] zp ZP_WORD:135 [ mode_mcchar::col#2 mode_mcchar::col#3 mode_mcchar::col#1 ] zp ZP_BYTE:280 [ mode_mcchar::$28 ] zp ZP_WORD:137 [ mode_mcchar::ch#2 mode_mcchar::ch#3 mode_mcchar::ch#1 ] zp ZP_BYTE:132 [ mode_mcchar::i#2 mode_mcchar::i#1 ] zp ZP_BYTE:133 [ mode_mcchar::cy#4 mode_mcchar::cy#1 ] -Limited combination testing to 1000 combinations of 36864 possible. -Uplifting [bitmap_plot] best 2912469 combination reg byte y [ bitmap_plot::y#4 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#3 bitmap_plot::y#2 ] reg byte x [ bitmap_plot::x#4 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#3 bitmap_plot::x#2 ] zp ZP_WORD:261 [ bitmap_plot::plotter_y#0 ] reg byte a [ bitmap_plot::$1 ] zp ZP_WORD:259 [ bitmap_plot::plotter_x#0 ] zp ZP_WORD:263 [ bitmap_plot::$0 ] -Uplifting [mode_8bppchunkybmm] best 2898969 combination reg byte x [ mode_8bppchunkybmm::gfxbCpuBank#4 mode_8bppchunkybmm::gfxbCpuBank#7 mode_8bppchunkybmm::gfxbCpuBank#8 mode_8bppchunkybmm::gfxbCpuBank#2 ] zp ZP_WORD:11 [ mode_8bppchunkybmm::gfxb#4 mode_8bppchunkybmm::gfxb#3 mode_8bppchunkybmm::gfxb#5 mode_8bppchunkybmm::gfxb#1 ] zp ZP_WORD:185 [ mode_8bppchunkybmm::$23 ] reg byte a [ mode_8bppchunkybmm::c#0 ] zp ZP_WORD:8 [ mode_8bppchunkybmm::x#2 mode_8bppchunkybmm::x#1 ] reg byte x [ mode_8bppchunkybmm::i#2 mode_8bppchunkybmm::i#1 ] zp ZP_BYTE:7 [ mode_8bppchunkybmm::y#6 mode_8bppchunkybmm::y#1 ] -Uplifting [mode_stdbitmap] best 2869969 combination reg byte a [ mode_stdbitmap::$19 ] reg byte a [ mode_stdbitmap::$22 ] reg byte a [ mode_stdbitmap::$23 ] reg byte x [ mode_stdbitmap::cx#2 mode_stdbitmap::cx#1 ] reg byte y [ mode_stdbitmap::col#0 ] zp ZP_WORD:94 [ mode_stdbitmap::ch#2 mode_stdbitmap::ch#3 mode_stdbitmap::ch#1 ] zp ZP_BYTE:245 [ mode_stdbitmap::col2#0 ] zp ZP_BYTE:91 [ mode_stdbitmap::i#2 mode_stdbitmap::i#1 ] zp ZP_BYTE:92 [ mode_stdbitmap::cy#4 mode_stdbitmap::cy#1 ] zp ZP_BYTE:96 [ mode_stdbitmap::l#2 mode_stdbitmap::l#1 ] -Limited combination testing to 1000 combinations of 13824 possible. -Uplifting [bitmap_line_xdyi] best 2860963 combination zp ZP_BYTE:110 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] zp ZP_BYTE:109 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] zp ZP_BYTE:266 [ bitmap_line_xdyi::$6 ] reg byte x [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] zp ZP_BYTE:106 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] zp ZP_BYTE:105 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] zp ZP_BYTE:107 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] -Uplifting [bitmap_line_xdyd] best 2851957 combination zp ZP_BYTE:122 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] zp ZP_BYTE:121 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] zp ZP_BYTE:268 [ bitmap_line_xdyd::$6 ] reg byte x [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] zp ZP_BYTE:118 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] zp ZP_BYTE:117 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] zp ZP_BYTE:119 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] -Uplifting [bitmap_line_ydxi] best 2839951 combination zp ZP_BYTE:102 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] reg byte x [ bitmap_line_ydxi::x#3 bitmap_line_ydxi::x#5 bitmap_line_ydxi::x#1 bitmap_line_ydxi::x#0 bitmap_line_ydxi::x#6 bitmap_line_ydxi::x#2 ] reg byte y [ bitmap_line_ydxi::$6 ] zp ZP_BYTE:101 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] zp ZP_BYTE:98 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] zp ZP_BYTE:97 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] zp ZP_BYTE:99 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] -Uplifting [bitmap_line_ydxd] best 2827945 combination zp ZP_BYTE:116 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] reg byte x [ bitmap_line_ydxd::x#3 bitmap_line_ydxd::x#5 bitmap_line_ydxd::x#1 bitmap_line_ydxd::x#0 bitmap_line_ydxd::x#6 bitmap_line_ydxd::x#2 ] reg byte y [ bitmap_line_ydxd::$6 ] zp ZP_BYTE:115 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#3 ] zp ZP_BYTE:112 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#1 bitmap_line_ydxd::yd#0 ] zp ZP_BYTE:111 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#1 bitmap_line_ydxd::xd#0 ] zp ZP_BYTE:113 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#1 bitmap_line_ydxd::y1#0 ] -Uplifting [mode_hicolstdchar] best 2795745 combination reg byte a [ mode_hicolstdchar::$24 ] reg byte a [ mode_hicolstdchar::$26 ] reg byte x [ mode_hicolstdchar::cx#2 mode_hicolstdchar::cx#1 ] zp ZP_WORD:87 [ mode_hicolstdchar::col#2 mode_hicolstdchar::col#3 mode_hicolstdchar::col#1 ] zp ZP_WORD:89 [ mode_hicolstdchar::ch#2 mode_hicolstdchar::ch#3 mode_hicolstdchar::ch#1 ] zp ZP_BYTE:240 [ mode_hicolstdchar::$25 ] reg byte a [ mode_hicolstdchar::v#0 ] reg byte x [ mode_hicolstdchar::i#2 mode_hicolstdchar::i#1 ] zp ZP_BYTE:85 [ mode_hicolstdchar::cy#4 mode_hicolstdchar::cy#1 ] -Limited combination testing to 1000 combinations of 2304 possible. -Uplifting [mode_hicolecmchar] best 2763545 combination reg byte a [ mode_hicolecmchar::$25 ] reg byte a [ mode_hicolecmchar::$27 ] reg byte x [ mode_hicolecmchar::cx#2 mode_hicolecmchar::cx#1 ] zp ZP_WORD:80 [ mode_hicolecmchar::col#2 mode_hicolecmchar::col#3 mode_hicolecmchar::col#1 ] zp ZP_WORD:82 [ mode_hicolecmchar::ch#2 mode_hicolecmchar::ch#3 mode_hicolecmchar::ch#1 ] zp ZP_BYTE:236 [ mode_hicolecmchar::$26 ] reg byte a [ mode_hicolecmchar::v#0 ] reg byte x [ mode_hicolecmchar::i#2 mode_hicolecmchar::i#1 ] zp ZP_BYTE:78 [ mode_hicolecmchar::cy#4 mode_hicolecmchar::cy#1 ] -Limited combination testing to 1000 combinations of 2304 possible. -Uplifting [mode_hicolmcchar] best 2731345 combination reg byte a [ mode_hicolmcchar::$25 ] reg byte a [ mode_hicolmcchar::$27 ] reg byte x [ mode_hicolmcchar::cx#2 mode_hicolmcchar::cx#1 ] zp ZP_WORD:73 [ mode_hicolmcchar::col#2 mode_hicolmcchar::col#3 mode_hicolmcchar::col#1 ] zp ZP_WORD:75 [ mode_hicolmcchar::ch#2 mode_hicolmcchar::ch#3 mode_hicolmcchar::ch#1 ] zp ZP_BYTE:232 [ mode_hicolmcchar::$26 ] reg byte a [ mode_hicolmcchar::v#0 ] reg byte x [ mode_hicolmcchar::i#2 mode_hicolmcchar::i#1 ] zp ZP_BYTE:71 [ mode_hicolmcchar::cy#4 mode_hicolmcchar::cy#1 ] -Limited combination testing to 1000 combinations of 2304 possible. -Uplifting [] best 2731264 combination zp ZP_WORD:155 [ print_char_cursor#17 print_char_cursor#19 print_char_cursor#101 print_char_cursor#32 print_char_cursor#1 ] zp ZP_WORD:157 [ print_line_cursor#18 print_line_cursor#17 print_line_cursor#19 ] reg byte x [ dtv_control#1 dtv_control#3 dtv_control#119 dtv_control#153 dtv_control#19 dtv_control#18 ] -Uplifting [bitmap_clear] best 2722264 combination zp ZP_WORD:124 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] reg byte x [ bitmap_clear::x#2 bitmap_clear::x#1 ] zp ZP_BYTE:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] zp ZP_WORD:269 [ bitmap_clear::$3 ] -Uplifting [menu] best 2719464 combination reg byte y [ menu::i#2 menu::i#1 ] zp ZP_WORD:4 [ menu::c#2 menu::c#1 ] reg byte a [ menu::$29 ] reg byte a [ menu::$33 ] reg byte a [ menu::$37 ] reg byte a [ menu::$41 ] zp ZP_BYTE:170 [ menu::$45 ] zp ZP_BYTE:172 [ menu::$49 ] zp ZP_BYTE:174 [ menu::$53 ] zp ZP_BYTE:176 [ menu::$57 ] zp ZP_BYTE:178 [ menu::$61 ] zp ZP_BYTE:180 [ menu::$65 ] zp ZP_BYTE:182 [ menu::$69 ] zp ZP_BYTE:184 [ menu::$73 ] -Limited combination testing to 1000 combinations of 50331648 possible. -Uplifting [dtvSetCpuBankSegment1] best 2718455 combination reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#3 dtvSetCpuBankSegment1::cpuBankIdx#1 ] -Uplifting [print_str_lines] best 2706455 combination zp ZP_WORD:153 [ print_str_lines::str#3 print_str_lines::str#2 print_str_lines::str#0 ] reg byte a [ print_str_lines::ch#0 ] -Uplifting [bitmap_init] best 2700755 combination zp ZP_WORD:130 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte y [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$0 ] reg byte a [ bitmap_init::$7 ] reg byte a [ bitmap_init::$8 ] zp ZP_BYTE:275 [ bitmap_init::$9 ] zp ZP_BYTE:276 [ bitmap_init::$10 ] zp ZP_BYTE:272 [ bitmap_init::$6 ] -Limited combination testing to 1000 combinations of 138240 possible. -Uplifting [print_cls] best 2700755 combination zp ZP_WORD:159 [ print_cls::sc#2 print_cls::sc#1 ] -Uplifting [mode_ctrl] best 2700355 combination reg byte a [ mode_ctrl::$1 ] -Uplifting [mode_ctrl_keys] best 2700339 combination zp ZP_BYTE:13 [ mode_ctrl_keys::ctrl#14 mode_ctrl_keys::ctrl#22 mode_ctrl_keys::ctrl#6 mode_ctrl_keys::ctrl#13 mode_ctrl_keys::ctrl#5 mode_ctrl_keys::ctrl#12 mode_ctrl_keys::ctrl#4 mode_ctrl_keys::ctrl#11 mode_ctrl_keys::ctrl#3 mode_ctrl_keys::ctrl#10 mode_ctrl_keys::ctrl#2 mode_ctrl_keys::ctrl#17 mode_ctrl_keys::ctrl#1 mode_ctrl_keys::ctrl#0 ] reg byte a [ mode_ctrl_keys::$2 ] reg byte a [ mode_ctrl_keys::$6 ] reg byte a [ mode_ctrl_keys::$10 ] reg byte a [ mode_ctrl_keys::$14 ] zp ZP_BYTE:199 [ mode_ctrl_keys::$18 ] zp ZP_BYTE:201 [ mode_ctrl_keys::$22 ] zp ZP_BYTE:203 [ mode_ctrl_keys::$26 ] -Limited combination testing to 1000 combinations of 49152 possible. -Uplifting [bitmap_line] best 2700027 combination reg byte y [ bitmap_line::y1#0 ] zp ZP_BYTE:250 [ bitmap_line::y0#0 ] zp ZP_BYTE:249 [ bitmap_line::x1#0 ] zp ZP_BYTE:248 [ bitmap_line::x0#0 ] zp ZP_BYTE:253 [ bitmap_line::yd#1 ] zp ZP_BYTE:254 [ bitmap_line::yd#0 ] zp ZP_BYTE:256 [ bitmap_line::yd#3 ] zp ZP_BYTE:257 [ bitmap_line::yd#10 ] zp ZP_BYTE:252 [ bitmap_line::xd#1 ] zp ZP_BYTE:255 [ bitmap_line::xd#0 ] -Limited combination testing to 1000 combinations of 186624 possible. -Uplifting [keyboard_matrix_read] best 2700009 combination reg byte y [ keyboard_matrix_read::rowid#0 ] reg byte a [ keyboard_matrix_read::return#2 ] reg byte a [ keyboard_matrix_read::return#0 ] -Uplifting [print_ln] best 2700009 combination -Uplifting [print_set_screen] best 2700009 combination -Uplifting [main] best 2700009 combination +Uplifting [mode_8bpppixelcell] best 3157484 combination reg byte a [ mode_8bpppixelcell::c#2 mode_8bpppixelcell::c#3 ] reg byte a [ mode_8bpppixelcell::$19 ] reg byte x [ mode_8bpppixelcell::cp#2 mode_8bpppixelcell::cp#1 ] zp ZP_BYTE:25 [ mode_8bpppixelcell::bits#2 mode_8bpppixelcell::bits#0 mode_8bpppixelcell::bits#1 ] zp ZP_WORD:26 [ mode_8bpppixelcell::gfxb#2 mode_8bpppixelcell::gfxb#5 mode_8bpppixelcell::gfxb#7 mode_8bpppixelcell::gfxb#1 ] zp ZP_BYTE:28 [ mode_8bpppixelcell::col#2 mode_8bpppixelcell::col#5 mode_8bpppixelcell::col#7 mode_8bpppixelcell::col#1 ] zp ZP_BYTE:211 [ mode_8bpppixelcell::$13 ] zp ZP_BYTE:213 [ mode_8bpppixelcell::$15 ] zp ZP_BYTE:214 [ mode_8bpppixelcell::$16 ] zp ZP_BYTE:18 [ mode_8bpppixelcell::ax#2 mode_8bpppixelcell::ax#1 ] zp ZP_WORD:22 [ mode_8bpppixelcell::chargen#2 mode_8bpppixelcell::chargen#4 mode_8bpppixelcell::chargen#1 ] zp ZP_BYTE:24 [ mode_8bpppixelcell::cr#6 mode_8bpppixelcell::cr#1 ] zp ZP_WORD:19 [ mode_8bpppixelcell::gfxa#2 mode_8bpppixelcell::gfxa#3 mode_8bpppixelcell::gfxa#1 ] zp ZP_BYTE:212 [ mode_8bpppixelcell::$14 ] zp ZP_BYTE:16 [ mode_8bpppixelcell::i#2 mode_8bpppixelcell::i#1 ] zp ZP_BYTE:17 [ mode_8bpppixelcell::ay#4 mode_8bpppixelcell::ay#1 ] zp ZP_BYTE:21 [ mode_8bpppixelcell::ch#8 mode_8bpppixelcell::ch#1 ] +Limited combination testing to 100 combinations of 1572864 possible. +Uplifting [mode_twoplanebitmap] best 3130484 combination zp ZP_WORD:50 [ mode_twoplanebitmap::gfxa#3 mode_twoplanebitmap::gfxa#6 mode_twoplanebitmap::gfxa#7 mode_twoplanebitmap::gfxa#2 mode_twoplanebitmap::gfxa#1 ] zp ZP_WORD:54 [ mode_twoplanebitmap::gfxb#2 mode_twoplanebitmap::gfxb#3 mode_twoplanebitmap::gfxb#1 ] reg byte x [ mode_twoplanebitmap::bx#2 mode_twoplanebitmap::bx#1 ] reg byte a [ mode_twoplanebitmap::$15 ] reg byte a [ mode_twoplanebitmap::$17 ] reg byte a [ mode_twoplanebitmap::$18 ] zp ZP_BYTE:224 [ mode_twoplanebitmap::$21 ] zp ZP_BYTE:46 [ mode_twoplanebitmap::cx#2 mode_twoplanebitmap::cx#1 ] zp ZP_BYTE:52 [ mode_twoplanebitmap::ax#2 mode_twoplanebitmap::ax#1 ] zp ZP_WORD:47 [ mode_twoplanebitmap::col#2 mode_twoplanebitmap::col#3 mode_twoplanebitmap::col#1 ] zp ZP_BYTE:221 [ mode_twoplanebitmap::$16 ] zp ZP_BYTE:44 [ mode_twoplanebitmap::i#2 mode_twoplanebitmap::i#1 ] zp ZP_BYTE:45 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cy#1 ] zp ZP_BYTE:49 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ay#1 ] zp ZP_BYTE:53 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::by#1 ] +Limited combination testing to 100 combinations of 196608 possible. +Uplifting [mode_sixsfred2] best 3103484 combination zp ZP_WORD:67 [ mode_sixsfred2::gfxb#2 mode_sixsfred2::gfxb#3 mode_sixsfred2::gfxb#1 ] reg byte x [ mode_sixsfred2::bx#2 mode_sixsfred2::bx#1 ] reg byte a [ mode_sixsfred2::$14 ] reg byte a [ mode_sixsfred2::$16 ] reg byte a [ mode_sixsfred2::$17 ] zp ZP_BYTE:229 [ mode_sixsfred2::$20 ] zp ZP_BYTE:230 [ mode_sixsfred2::row#0 ] zp ZP_BYTE:59 [ mode_sixsfred2::cx#2 mode_sixsfred2::cx#1 ] zp ZP_BYTE:65 [ mode_sixsfred2::ax#2 mode_sixsfred2::ax#1 ] zp ZP_WORD:63 [ mode_sixsfred2::gfxa#2 mode_sixsfred2::gfxa#3 mode_sixsfred2::gfxa#1 ] zp ZP_WORD:60 [ mode_sixsfred2::col#2 mode_sixsfred2::col#3 mode_sixsfred2::col#1 ] zp ZP_BYTE:226 [ mode_sixsfred2::$15 ] zp ZP_BYTE:57 [ mode_sixsfred2::i#2 mode_sixsfred2::i#1 ] zp ZP_BYTE:62 [ mode_sixsfred2::ay#4 mode_sixsfred2::ay#1 ] zp ZP_BYTE:58 [ mode_sixsfred2::cy#4 mode_sixsfred2::cy#1 ] zp ZP_BYTE:66 [ mode_sixsfred2::by#4 mode_sixsfred2::by#1 ] +Limited combination testing to 100 combinations of 786432 possible. +Uplifting [mode_sixsfred] best 3066484 combination zp ZP_WORD:41 [ mode_sixsfred::gfxb#2 mode_sixsfred::gfxb#3 mode_sixsfred::gfxb#1 ] reg byte x [ mode_sixsfred::bx#2 mode_sixsfred::bx#1 ] reg byte x [ mode_sixsfred::cx#2 mode_sixsfred::cx#1 ] reg byte a [ mode_sixsfred::$16 ] reg byte a [ mode_sixsfred::$17 ] reg byte a [ mode_sixsfred::$20 ] zp ZP_BYTE:219 [ mode_sixsfred::row#0 ] zp ZP_BYTE:39 [ mode_sixsfred::ax#2 mode_sixsfred::ax#1 ] zp ZP_WORD:34 [ mode_sixsfred::col#2 mode_sixsfred::col#3 mode_sixsfred::col#1 ] zp ZP_WORD:37 [ mode_sixsfred::gfxa#2 mode_sixsfred::gfxa#3 mode_sixsfred::gfxa#1 ] zp ZP_BYTE:31 [ mode_sixsfred::i#2 mode_sixsfred::i#1 ] zp ZP_BYTE:32 [ mode_sixsfred::cy#4 mode_sixsfred::cy#1 ] zp ZP_BYTE:36 [ mode_sixsfred::ay#4 mode_sixsfred::ay#1 ] zp ZP_BYTE:40 [ mode_sixsfred::by#4 mode_sixsfred::by#1 ] +Limited combination testing to 100 combinations of 65536 possible. +Uplifting [mode_stdchar] best 3042484 combination reg byte a [ mode_stdchar::$24 ] reg byte a [ mode_stdchar::$25 ] reg byte a [ mode_stdchar::$26 ] reg byte a [ mode_stdchar::$28 ] zp ZP_BYTE:294 [ mode_stdchar::$29 ] zp ZP_BYTE:148 [ mode_stdchar::cx#2 mode_stdchar::cx#1 ] zp ZP_WORD:149 [ mode_stdchar::col#2 mode_stdchar::col#3 mode_stdchar::col#1 ] zp ZP_BYTE:292 [ mode_stdchar::$27 ] zp ZP_WORD:151 [ mode_stdchar::ch#2 mode_stdchar::ch#3 mode_stdchar::ch#1 ] zp ZP_BYTE:146 [ mode_stdchar::i#2 mode_stdchar::i#1 ] zp ZP_BYTE:147 [ mode_stdchar::cy#4 mode_stdchar::cy#1 ] +Limited combination testing to 100 combinations of 36864 possible. +Uplifting [mode_ecmchar] best 3018484 combination reg byte a [ mode_ecmchar::$25 ] reg byte a [ mode_ecmchar::$26 ] reg byte a [ mode_ecmchar::$27 ] reg byte a [ mode_ecmchar::$29 ] zp ZP_BYTE:288 [ mode_ecmchar::$30 ] zp ZP_BYTE:141 [ mode_ecmchar::cx#2 mode_ecmchar::cx#1 ] zp ZP_WORD:142 [ mode_ecmchar::col#2 mode_ecmchar::col#3 mode_ecmchar::col#1 ] zp ZP_BYTE:286 [ mode_ecmchar::$28 ] zp ZP_WORD:144 [ mode_ecmchar::ch#2 mode_ecmchar::ch#3 mode_ecmchar::ch#1 ] zp ZP_BYTE:139 [ mode_ecmchar::i#2 mode_ecmchar::i#1 ] zp ZP_BYTE:140 [ mode_ecmchar::cy#4 mode_ecmchar::cy#1 ] +Limited combination testing to 100 combinations of 36864 possible. +Uplifting [mode_mcchar] best 2994484 combination reg byte a [ mode_mcchar::$25 ] reg byte a [ mode_mcchar::$26 ] reg byte a [ mode_mcchar::$27 ] reg byte a [ mode_mcchar::$29 ] zp ZP_BYTE:282 [ mode_mcchar::$30 ] zp ZP_BYTE:134 [ mode_mcchar::cx#2 mode_mcchar::cx#1 ] zp ZP_WORD:135 [ mode_mcchar::col#2 mode_mcchar::col#3 mode_mcchar::col#1 ] zp ZP_BYTE:280 [ mode_mcchar::$28 ] zp ZP_WORD:137 [ mode_mcchar::ch#2 mode_mcchar::ch#3 mode_mcchar::ch#1 ] zp ZP_BYTE:132 [ mode_mcchar::i#2 mode_mcchar::i#1 ] zp ZP_BYTE:133 [ mode_mcchar::cy#4 mode_mcchar::cy#1 ] +Limited combination testing to 100 combinations of 36864 possible. +Uplifting [bitmap_plot] best 2970469 combination reg byte y [ bitmap_plot::y#4 bitmap_plot::y#1 bitmap_plot::y#0 bitmap_plot::y#3 bitmap_plot::y#2 ] reg byte x [ bitmap_plot::x#4 bitmap_plot::x#1 bitmap_plot::x#0 bitmap_plot::x#3 bitmap_plot::x#2 ] zp ZP_WORD:261 [ bitmap_plot::plotter_y#0 ] reg byte a [ bitmap_plot::$1 ] zp ZP_WORD:259 [ bitmap_plot::plotter_x#0 ] zp ZP_WORD:263 [ bitmap_plot::$0 ] +Uplifting [mode_8bppchunkybmm] best 2956969 combination reg byte x [ mode_8bppchunkybmm::gfxbCpuBank#4 mode_8bppchunkybmm::gfxbCpuBank#7 mode_8bppchunkybmm::gfxbCpuBank#8 mode_8bppchunkybmm::gfxbCpuBank#2 ] zp ZP_WORD:11 [ mode_8bppchunkybmm::gfxb#4 mode_8bppchunkybmm::gfxb#3 mode_8bppchunkybmm::gfxb#5 mode_8bppchunkybmm::gfxb#1 ] zp ZP_WORD:185 [ mode_8bppchunkybmm::$23 ] reg byte a [ mode_8bppchunkybmm::c#0 ] zp ZP_WORD:8 [ mode_8bppchunkybmm::x#2 mode_8bppchunkybmm::x#1 ] reg byte x [ mode_8bppchunkybmm::i#2 mode_8bppchunkybmm::i#1 ] zp ZP_BYTE:7 [ mode_8bppchunkybmm::y#6 mode_8bppchunkybmm::y#1 ] +Uplifting [mode_stdbitmap] best 2928969 combination reg byte a [ mode_stdbitmap::$19 ] reg byte a [ mode_stdbitmap::$22 ] reg byte a [ mode_stdbitmap::$23 ] reg byte x [ mode_stdbitmap::cx#2 mode_stdbitmap::cx#1 ] zp ZP_BYTE:244 [ mode_stdbitmap::col#0 ] zp ZP_WORD:94 [ mode_stdbitmap::ch#2 mode_stdbitmap::ch#3 mode_stdbitmap::ch#1 ] zp ZP_BYTE:245 [ mode_stdbitmap::col2#0 ] zp ZP_BYTE:91 [ mode_stdbitmap::i#2 mode_stdbitmap::i#1 ] zp ZP_BYTE:92 [ mode_stdbitmap::cy#4 mode_stdbitmap::cy#1 ] zp ZP_BYTE:96 [ mode_stdbitmap::l#2 mode_stdbitmap::l#1 ] +Limited combination testing to 100 combinations of 13824 possible. +Uplifting [bitmap_line_xdyi] best 2919963 combination zp ZP_BYTE:110 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] zp ZP_BYTE:109 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] zp ZP_BYTE:266 [ bitmap_line_xdyi::$6 ] reg byte x [ bitmap_line_xdyi::x#3 bitmap_line_xdyi::x#6 bitmap_line_xdyi::x#0 bitmap_line_xdyi::x#1 bitmap_line_xdyi::x#2 ] zp ZP_BYTE:106 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] zp ZP_BYTE:105 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] zp ZP_BYTE:107 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] +Limited combination testing to 100 combinations of 256 possible. +Uplifting [bitmap_line_xdyd] best 2910957 combination zp ZP_BYTE:122 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] zp ZP_BYTE:121 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] zp ZP_BYTE:268 [ bitmap_line_xdyd::$6 ] reg byte x [ bitmap_line_xdyd::x#3 bitmap_line_xdyd::x#6 bitmap_line_xdyd::x#0 bitmap_line_xdyd::x#1 bitmap_line_xdyd::x#2 ] zp ZP_BYTE:118 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] zp ZP_BYTE:117 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] zp ZP_BYTE:119 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] +Limited combination testing to 100 combinations of 256 possible. +Uplifting [bitmap_line_ydxi] best 2898951 combination zp ZP_BYTE:102 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] reg byte x [ bitmap_line_ydxi::x#3 bitmap_line_ydxi::x#5 bitmap_line_ydxi::x#1 bitmap_line_ydxi::x#0 bitmap_line_ydxi::x#6 bitmap_line_ydxi::x#2 ] reg byte y [ bitmap_line_ydxi::$6 ] zp ZP_BYTE:101 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] zp ZP_BYTE:98 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] zp ZP_BYTE:97 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] zp ZP_BYTE:99 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] +Limited combination testing to 100 combinations of 256 possible. +Uplifting [bitmap_line_ydxd] best 2886945 combination zp ZP_BYTE:116 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] reg byte x [ bitmap_line_ydxd::x#3 bitmap_line_ydxd::x#5 bitmap_line_ydxd::x#1 bitmap_line_ydxd::x#0 bitmap_line_ydxd::x#6 bitmap_line_ydxd::x#2 ] reg byte y [ bitmap_line_ydxd::$6 ] zp ZP_BYTE:115 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#3 ] zp ZP_BYTE:112 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#1 bitmap_line_ydxd::yd#0 ] zp ZP_BYTE:111 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#1 bitmap_line_ydxd::xd#0 ] zp ZP_BYTE:113 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#1 bitmap_line_ydxd::y1#0 ] +Limited combination testing to 100 combinations of 256 possible. +Uplifting [mode_hicolstdchar] best 2864945 combination reg byte a [ mode_hicolstdchar::$24 ] reg byte a [ mode_hicolstdchar::$26 ] reg byte x [ mode_hicolstdchar::cx#2 mode_hicolstdchar::cx#1 ] zp ZP_WORD:87 [ mode_hicolstdchar::col#2 mode_hicolstdchar::col#3 mode_hicolstdchar::col#1 ] zp ZP_WORD:89 [ mode_hicolstdchar::ch#2 mode_hicolstdchar::ch#3 mode_hicolstdchar::ch#1 ] zp ZP_BYTE:240 [ mode_hicolstdchar::$25 ] zp ZP_BYTE:242 [ mode_hicolstdchar::v#0 ] zp ZP_BYTE:84 [ mode_hicolstdchar::i#2 mode_hicolstdchar::i#1 ] zp ZP_BYTE:85 [ mode_hicolstdchar::cy#4 mode_hicolstdchar::cy#1 ] +Limited combination testing to 100 combinations of 2304 possible. +Uplifting [mode_hicolecmchar] best 2842945 combination reg byte a [ mode_hicolecmchar::$25 ] reg byte a [ mode_hicolecmchar::$27 ] reg byte x [ mode_hicolecmchar::cx#2 mode_hicolecmchar::cx#1 ] zp ZP_WORD:80 [ mode_hicolecmchar::col#2 mode_hicolecmchar::col#3 mode_hicolecmchar::col#1 ] zp ZP_WORD:82 [ mode_hicolecmchar::ch#2 mode_hicolecmchar::ch#3 mode_hicolecmchar::ch#1 ] zp ZP_BYTE:236 [ mode_hicolecmchar::$26 ] zp ZP_BYTE:238 [ mode_hicolecmchar::v#0 ] zp ZP_BYTE:77 [ mode_hicolecmchar::i#2 mode_hicolecmchar::i#1 ] zp ZP_BYTE:78 [ mode_hicolecmchar::cy#4 mode_hicolecmchar::cy#1 ] +Limited combination testing to 100 combinations of 2304 possible. +Uplifting [mode_hicolmcchar] best 2820945 combination reg byte a [ mode_hicolmcchar::$25 ] reg byte a [ mode_hicolmcchar::$27 ] reg byte x [ mode_hicolmcchar::cx#2 mode_hicolmcchar::cx#1 ] zp ZP_WORD:73 [ mode_hicolmcchar::col#2 mode_hicolmcchar::col#3 mode_hicolmcchar::col#1 ] zp ZP_WORD:75 [ mode_hicolmcchar::ch#2 mode_hicolmcchar::ch#3 mode_hicolmcchar::ch#1 ] zp ZP_BYTE:232 [ mode_hicolmcchar::$26 ] zp ZP_BYTE:234 [ mode_hicolmcchar::v#0 ] zp ZP_BYTE:70 [ mode_hicolmcchar::i#2 mode_hicolmcchar::i#1 ] zp ZP_BYTE:71 [ mode_hicolmcchar::cy#4 mode_hicolmcchar::cy#1 ] +Limited combination testing to 100 combinations of 2304 possible. +Uplifting [] best 2820864 combination zp ZP_WORD:155 [ print_char_cursor#17 print_char_cursor#19 print_char_cursor#101 print_char_cursor#32 print_char_cursor#1 ] zp ZP_WORD:157 [ print_line_cursor#18 print_line_cursor#17 print_line_cursor#19 ] reg byte x [ dtv_control#1 dtv_control#3 dtv_control#119 dtv_control#153 dtv_control#19 dtv_control#18 ] +Uplifting [bitmap_clear] best 2811864 combination zp ZP_WORD:124 [ bitmap_clear::bitmap#2 bitmap_clear::bitmap#3 bitmap_clear::bitmap#5 bitmap_clear::bitmap#1 ] reg byte x [ bitmap_clear::x#2 bitmap_clear::x#1 ] zp ZP_BYTE:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] zp ZP_WORD:269 [ bitmap_clear::$3 ] +Uplifting [menu] best 2809464 combination reg byte y [ menu::i#2 menu::i#1 ] zp ZP_WORD:4 [ menu::c#2 menu::c#1 ] reg byte a [ menu::$29 ] reg byte a [ menu::$33 ] reg byte a [ menu::$37 ] zp ZP_BYTE:168 [ menu::$41 ] zp ZP_BYTE:170 [ menu::$45 ] zp ZP_BYTE:172 [ menu::$49 ] zp ZP_BYTE:174 [ menu::$53 ] zp ZP_BYTE:176 [ menu::$57 ] zp ZP_BYTE:178 [ menu::$61 ] zp ZP_BYTE:180 [ menu::$65 ] zp ZP_BYTE:182 [ menu::$69 ] zp ZP_BYTE:184 [ menu::$73 ] +Limited combination testing to 100 combinations of 50331648 possible. +Uplifting [dtvSetCpuBankSegment1] best 2808455 combination reg byte a [ dtvSetCpuBankSegment1::cpuBankIdx#3 dtvSetCpuBankSegment1::cpuBankIdx#1 ] +Uplifting [print_str_lines] best 2796455 combination zp ZP_WORD:153 [ print_str_lines::str#3 print_str_lines::str#2 print_str_lines::str#0 ] reg byte a [ print_str_lines::ch#0 ] +Uplifting [bitmap_init] best 2791955 combination zp ZP_WORD:130 [ bitmap_init::yoffs#2 bitmap_init::yoffs#4 bitmap_init::yoffs#1 ] reg byte y [ bitmap_init::bits#3 bitmap_init::bits#4 bitmap_init::bits#1 ] reg byte x [ bitmap_init::x#2 bitmap_init::x#1 ] reg byte x [ bitmap_init::y#2 bitmap_init::y#1 ] reg byte a [ bitmap_init::$0 ] zp ZP_BYTE:273 [ bitmap_init::$7 ] zp ZP_BYTE:274 [ bitmap_init::$8 ] zp ZP_BYTE:275 [ bitmap_init::$9 ] zp ZP_BYTE:276 [ bitmap_init::$10 ] zp ZP_BYTE:272 [ bitmap_init::$6 ] +Limited combination testing to 100 combinations of 138240 possible. +Uplifting [print_cls] best 2791955 combination zp ZP_WORD:159 [ print_cls::sc#2 print_cls::sc#1 ] +Uplifting [mode_ctrl] best 2791555 combination reg byte a [ mode_ctrl::$1 ] +Uplifting [mode_ctrl_keys] best 2791543 combination zp ZP_BYTE:13 [ mode_ctrl_keys::ctrl#14 mode_ctrl_keys::ctrl#22 mode_ctrl_keys::ctrl#6 mode_ctrl_keys::ctrl#13 mode_ctrl_keys::ctrl#5 mode_ctrl_keys::ctrl#12 mode_ctrl_keys::ctrl#4 mode_ctrl_keys::ctrl#11 mode_ctrl_keys::ctrl#3 mode_ctrl_keys::ctrl#10 mode_ctrl_keys::ctrl#2 mode_ctrl_keys::ctrl#17 mode_ctrl_keys::ctrl#1 mode_ctrl_keys::ctrl#0 ] reg byte a [ mode_ctrl_keys::$2 ] reg byte a [ mode_ctrl_keys::$6 ] reg byte a [ mode_ctrl_keys::$10 ] zp ZP_BYTE:197 [ mode_ctrl_keys::$14 ] zp ZP_BYTE:199 [ mode_ctrl_keys::$18 ] zp ZP_BYTE:201 [ mode_ctrl_keys::$22 ] zp ZP_BYTE:203 [ mode_ctrl_keys::$26 ] +Limited combination testing to 100 combinations of 49152 possible. +Uplifting [bitmap_line] best 2791231 combination reg byte y [ bitmap_line::y1#0 ] zp ZP_BYTE:250 [ bitmap_line::y0#0 ] zp ZP_BYTE:249 [ bitmap_line::x1#0 ] zp ZP_BYTE:248 [ bitmap_line::x0#0 ] zp ZP_BYTE:253 [ bitmap_line::yd#1 ] zp ZP_BYTE:254 [ bitmap_line::yd#0 ] zp ZP_BYTE:256 [ bitmap_line::yd#3 ] zp ZP_BYTE:257 [ bitmap_line::yd#10 ] zp ZP_BYTE:252 [ bitmap_line::xd#1 ] zp ZP_BYTE:255 [ bitmap_line::xd#0 ] +Limited combination testing to 100 combinations of 186624 possible. +Uplifting [keyboard_matrix_read] best 2791213 combination reg byte y [ keyboard_matrix_read::rowid#0 ] reg byte a [ keyboard_matrix_read::return#2 ] reg byte a [ keyboard_matrix_read::return#0 ] +Uplifting [print_ln] best 2791213 combination +Uplifting [print_set_screen] best 2791213 combination +Uplifting [main] best 2791213 combination Attempting to uplift remaining variables inzp ZP_BYTE:25 [ mode_8bpppixelcell::bits#2 mode_8bpppixelcell::bits#0 mode_8bpppixelcell::bits#1 ] -Uplifting [mode_8bpppixelcell] best 2700009 combination zp ZP_BYTE:25 [ mode_8bpppixelcell::bits#2 mode_8bpppixelcell::bits#0 mode_8bpppixelcell::bits#1 ] +Uplifting [mode_8bpppixelcell] best 2791213 combination zp ZP_BYTE:25 [ mode_8bpppixelcell::bits#2 mode_8bpppixelcell::bits#0 mode_8bpppixelcell::bits#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:28 [ mode_8bpppixelcell::col#2 mode_8bpppixelcell::col#5 mode_8bpppixelcell::col#7 mode_8bpppixelcell::col#1 ] -Uplifting [mode_8bpppixelcell] best 2700009 combination zp ZP_BYTE:28 [ mode_8bpppixelcell::col#2 mode_8bpppixelcell::col#5 mode_8bpppixelcell::col#7 mode_8bpppixelcell::col#1 ] +Uplifting [mode_8bpppixelcell] best 2791213 combination zp ZP_BYTE:28 [ mode_8bpppixelcell::col#2 mode_8bpppixelcell::col#5 mode_8bpppixelcell::col#7 mode_8bpppixelcell::col#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:102 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] -Uplifting [bitmap_line_ydxi] best 2700009 combination zp ZP_BYTE:102 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] +Uplifting [bitmap_line_ydxi] best 2791213 combination zp ZP_BYTE:102 [ bitmap_line_ydxi::e#3 bitmap_line_ydxi::e#0 bitmap_line_ydxi::e#6 bitmap_line_ydxi::e#2 bitmap_line_ydxi::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:110 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] -Uplifting [bitmap_line_xdyi] best 2700009 combination zp ZP_BYTE:110 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] +Uplifting [bitmap_line_xdyi] best 2791213 combination zp ZP_BYTE:110 [ bitmap_line_xdyi::e#3 bitmap_line_xdyi::e#0 bitmap_line_xdyi::e#6 bitmap_line_xdyi::e#2 bitmap_line_xdyi::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:116 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] -Uplifting [bitmap_line_ydxd] best 2700009 combination zp ZP_BYTE:116 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] +Uplifting [bitmap_line_ydxd] best 2791213 combination zp ZP_BYTE:116 [ bitmap_line_ydxd::e#3 bitmap_line_ydxd::e#0 bitmap_line_ydxd::e#6 bitmap_line_ydxd::e#2 bitmap_line_ydxd::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:122 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] -Uplifting [bitmap_line_xdyd] best 2700009 combination zp ZP_BYTE:122 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] +Uplifting [bitmap_line_xdyd] best 2791213 combination zp ZP_BYTE:122 [ bitmap_line_xdyd::e#3 bitmap_line_xdyd::e#0 bitmap_line_xdyd::e#6 bitmap_line_xdyd::e#2 bitmap_line_xdyd::e#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:109 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] -Uplifting [bitmap_line_xdyi] best 2700009 combination zp ZP_BYTE:109 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] +Uplifting [bitmap_line_xdyi] best 2791213 combination zp ZP_BYTE:109 [ bitmap_line_xdyi::y#3 bitmap_line_xdyi::y#5 bitmap_line_xdyi::y#0 bitmap_line_xdyi::y#1 bitmap_line_xdyi::y#6 bitmap_line_xdyi::y#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:121 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] -Uplifting [bitmap_line_xdyd] best 2700009 combination zp ZP_BYTE:121 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] +Uplifting [bitmap_line_xdyd] best 2791213 combination zp ZP_BYTE:121 [ bitmap_line_xdyd::y#3 bitmap_line_xdyd::y#5 bitmap_line_xdyd::y#0 bitmap_line_xdyd::y#1 bitmap_line_xdyd::y#6 bitmap_line_xdyd::y#2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:211 [ mode_8bpppixelcell::$13 ] +Uplifting [mode_8bpppixelcell] best 2785213 combination reg byte a [ mode_8bpppixelcell::$13 ] +Attempting to uplift remaining variables inzp ZP_BYTE:213 [ mode_8bpppixelcell::$15 ] +Uplifting [mode_8bpppixelcell] best 2779213 combination reg byte a [ mode_8bpppixelcell::$15 ] Attempting to uplift remaining variables inzp ZP_BYTE:214 [ mode_8bpppixelcell::$16 ] -Uplifting [mode_8bpppixelcell] best 2694009 combination reg byte a [ mode_8bpppixelcell::$16 ] +Uplifting [mode_8bpppixelcell] best 2773213 combination reg byte a [ mode_8bpppixelcell::$16 ] +Attempting to uplift remaining variables inzp ZP_BYTE:219 [ mode_sixsfred::row#0 ] +Uplifting [mode_sixsfred] best 2769213 combination reg byte a [ mode_sixsfred::row#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:224 [ mode_twoplanebitmap::$21 ] +Uplifting [mode_twoplanebitmap] best 2765213 combination reg byte a [ mode_twoplanebitmap::$21 ] +Attempting to uplift remaining variables inzp ZP_BYTE:229 [ mode_sixsfred2::$20 ] +Uplifting [mode_sixsfred2] best 2759213 combination reg byte a [ mode_sixsfred2::$20 ] +Attempting to uplift remaining variables inzp ZP_BYTE:230 [ mode_sixsfred2::row#0 ] +Uplifting [mode_sixsfred2] best 2755213 combination reg byte a [ mode_sixsfred2::row#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:266 [ bitmap_line_xdyi::$6 ] -Uplifting [bitmap_line_xdyi] best 2694009 combination zp ZP_BYTE:266 [ bitmap_line_xdyi::$6 ] +Uplifting [bitmap_line_xdyi] best 2755213 combination zp ZP_BYTE:266 [ bitmap_line_xdyi::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:268 [ bitmap_line_xdyd::$6 ] -Uplifting [bitmap_line_xdyd] best 2694009 combination zp ZP_BYTE:268 [ bitmap_line_xdyd::$6 ] +Uplifting [bitmap_line_xdyd] best 2755213 combination zp ZP_BYTE:268 [ bitmap_line_xdyd::$6 ] +Attempting to uplift remaining variables inzp ZP_BYTE:282 [ mode_mcchar::$30 ] +Uplifting [mode_mcchar] best 2749213 combination reg byte a [ mode_mcchar::$30 ] +Attempting to uplift remaining variables inzp ZP_BYTE:288 [ mode_ecmchar::$30 ] +Uplifting [mode_ecmchar] best 2743213 combination reg byte a [ mode_ecmchar::$30 ] +Attempting to uplift remaining variables inzp ZP_BYTE:294 [ mode_stdchar::$29 ] +Uplifting [mode_stdchar] best 2737213 combination reg byte a [ mode_stdchar::$29 ] Attempting to uplift remaining variables inzp ZP_BYTE:18 [ mode_8bpppixelcell::ax#2 mode_8bpppixelcell::ax#1 ] -Uplifting [mode_8bpppixelcell] best 2684009 combination reg byte x [ mode_8bpppixelcell::ax#2 mode_8bpppixelcell::ax#1 ] +Uplifting [mode_8bpppixelcell] best 2727213 combination reg byte x [ mode_8bpppixelcell::ax#2 mode_8bpppixelcell::ax#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:46 [ mode_twoplanebitmap::cx#2 mode_twoplanebitmap::cx#1 ] +Uplifting [mode_twoplanebitmap] best 2717213 combination reg byte x [ mode_twoplanebitmap::cx#2 mode_twoplanebitmap::cx#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:59 [ mode_sixsfred2::cx#2 mode_sixsfred2::cx#1 ] -Uplifting [mode_sixsfred2] best 2674009 combination reg byte x [ mode_sixsfred2::cx#2 mode_sixsfred2::cx#1 ] +Uplifting [mode_sixsfred2] best 2707213 combination reg byte x [ mode_sixsfred2::cx#2 mode_sixsfred2::cx#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:39 [ mode_sixsfred::ax#2 mode_sixsfred::ax#1 ] -Uplifting [mode_sixsfred] best 2665009 combination reg byte x [ mode_sixsfred::ax#2 mode_sixsfred::ax#1 ] +Uplifting [mode_sixsfred] best 2698213 combination reg byte x [ mode_sixsfred::ax#2 mode_sixsfred::ax#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:65 [ mode_sixsfred2::ax#2 mode_sixsfred2::ax#1 ] -Uplifting [mode_sixsfred2] best 2656009 combination reg byte x [ mode_sixsfred2::ax#2 mode_sixsfred2::ax#1 ] +Uplifting [mode_sixsfred2] best 2689213 combination reg byte x [ mode_sixsfred2::ax#2 mode_sixsfred2::ax#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:134 [ mode_mcchar::cx#2 mode_mcchar::cx#1 ] -Uplifting [mode_mcchar] best 2645009 combination reg byte x [ mode_mcchar::cx#2 mode_mcchar::cx#1 ] +Uplifting [mode_mcchar] best 2678213 combination reg byte x [ mode_mcchar::cx#2 mode_mcchar::cx#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:141 [ mode_ecmchar::cx#2 mode_ecmchar::cx#1 ] -Uplifting [mode_ecmchar] best 2634009 combination reg byte x [ mode_ecmchar::cx#2 mode_ecmchar::cx#1 ] +Uplifting [mode_ecmchar] best 2667213 combination reg byte x [ mode_ecmchar::cx#2 mode_ecmchar::cx#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:148 [ mode_stdchar::cx#2 mode_stdchar::cx#1 ] -Uplifting [mode_stdchar] best 2623009 combination reg byte x [ mode_stdchar::cx#2 mode_stdchar::cx#1 ] +Uplifting [mode_stdchar] best 2656213 combination reg byte x [ mode_stdchar::cx#2 mode_stdchar::cx#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:52 [ mode_twoplanebitmap::ax#2 mode_twoplanebitmap::ax#1 ] -Uplifting [mode_twoplanebitmap] best 2614009 combination reg byte x [ mode_twoplanebitmap::ax#2 mode_twoplanebitmap::ax#1 ] +Uplifting [mode_twoplanebitmap] best 2647213 combination reg byte x [ mode_twoplanebitmap::ax#2 mode_twoplanebitmap::ax#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:24 [ mode_8bpppixelcell::cr#6 mode_8bpppixelcell::cr#1 ] -Uplifting [mode_8bpppixelcell] best 2614009 combination zp ZP_BYTE:24 [ mode_8bpppixelcell::cr#6 mode_8bpppixelcell::cr#1 ] +Uplifting [mode_8bpppixelcell] best 2647213 combination zp ZP_BYTE:24 [ mode_8bpppixelcell::cr#6 mode_8bpppixelcell::cr#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:244 [ mode_stdbitmap::col#0 ] +Uplifting [mode_stdbitmap] best 2646213 combination reg byte y [ mode_stdbitmap::col#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:101 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] -Uplifting [bitmap_line_ydxi] best 2614009 combination zp ZP_BYTE:101 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] +Uplifting [bitmap_line_ydxi] best 2646213 combination zp ZP_BYTE:101 [ bitmap_line_ydxi::y#3 bitmap_line_ydxi::y#6 bitmap_line_ydxi::y#1 bitmap_line_ydxi::y#0 bitmap_line_ydxi::y#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:115 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#3 ] -Uplifting [bitmap_line_ydxd] best 2614009 combination zp ZP_BYTE:115 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#3 ] +Uplifting [bitmap_line_ydxd] best 2646213 combination zp ZP_BYTE:115 [ bitmap_line_ydxd::y#2 bitmap_line_ydxd::y#7 bitmap_line_ydxd::y#1 bitmap_line_ydxd::y#0 bitmap_line_ydxd::y#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:212 [ mode_8bpppixelcell::$14 ] -Uplifting [mode_8bpppixelcell] best 2614009 combination zp ZP_BYTE:212 [ mode_8bpppixelcell::$14 ] +Uplifting [mode_8bpppixelcell] best 2646213 combination zp ZP_BYTE:212 [ mode_8bpppixelcell::$14 ] Attempting to uplift remaining variables inzp ZP_BYTE:221 [ mode_twoplanebitmap::$16 ] -Uplifting [mode_twoplanebitmap] best 2614009 combination zp ZP_BYTE:221 [ mode_twoplanebitmap::$16 ] +Uplifting [mode_twoplanebitmap] best 2646213 combination zp ZP_BYTE:221 [ mode_twoplanebitmap::$16 ] Attempting to uplift remaining variables inzp ZP_BYTE:226 [ mode_sixsfred2::$15 ] -Uplifting [mode_sixsfred2] best 2614009 combination zp ZP_BYTE:226 [ mode_sixsfred2::$15 ] +Uplifting [mode_sixsfred2] best 2646213 combination zp ZP_BYTE:226 [ mode_sixsfred2::$15 ] Attempting to uplift remaining variables inzp ZP_BYTE:232 [ mode_hicolmcchar::$26 ] -Uplifting [mode_hicolmcchar] best 2614009 combination zp ZP_BYTE:232 [ mode_hicolmcchar::$26 ] +Uplifting [mode_hicolmcchar] best 2646213 combination zp ZP_BYTE:232 [ mode_hicolmcchar::$26 ] +Attempting to uplift remaining variables inzp ZP_BYTE:234 [ mode_hicolmcchar::v#0 ] +Uplifting [mode_hicolmcchar] best 2637213 combination reg byte a [ mode_hicolmcchar::v#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:236 [ mode_hicolecmchar::$26 ] -Uplifting [mode_hicolecmchar] best 2614009 combination zp ZP_BYTE:236 [ mode_hicolecmchar::$26 ] +Uplifting [mode_hicolecmchar] best 2637213 combination zp ZP_BYTE:236 [ mode_hicolecmchar::$26 ] +Attempting to uplift remaining variables inzp ZP_BYTE:238 [ mode_hicolecmchar::v#0 ] +Uplifting [mode_hicolecmchar] best 2628213 combination reg byte a [ mode_hicolecmchar::v#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:240 [ mode_hicolstdchar::$25 ] -Uplifting [mode_hicolstdchar] best 2614009 combination zp ZP_BYTE:240 [ mode_hicolstdchar::$25 ] +Uplifting [mode_hicolstdchar] best 2628213 combination zp ZP_BYTE:240 [ mode_hicolstdchar::$25 ] +Attempting to uplift remaining variables inzp ZP_BYTE:242 [ mode_hicolstdchar::v#0 ] +Uplifting [mode_hicolstdchar] best 2619213 combination reg byte a [ mode_hicolstdchar::v#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:245 [ mode_stdbitmap::col2#0 ] -Uplifting [mode_stdbitmap] best 2614009 combination zp ZP_BYTE:245 [ mode_stdbitmap::col2#0 ] +Uplifting [mode_stdbitmap] best 2619213 combination zp ZP_BYTE:245 [ mode_stdbitmap::col2#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:280 [ mode_mcchar::$28 ] -Uplifting [mode_mcchar] best 2614009 combination zp ZP_BYTE:280 [ mode_mcchar::$28 ] +Uplifting [mode_mcchar] best 2619213 combination zp ZP_BYTE:280 [ mode_mcchar::$28 ] Attempting to uplift remaining variables inzp ZP_BYTE:286 [ mode_ecmchar::$28 ] -Uplifting [mode_ecmchar] best 2614009 combination zp ZP_BYTE:286 [ mode_ecmchar::$28 ] +Uplifting [mode_ecmchar] best 2619213 combination zp ZP_BYTE:286 [ mode_ecmchar::$28 ] Attempting to uplift remaining variables inzp ZP_BYTE:292 [ mode_stdchar::$27 ] -Uplifting [mode_stdchar] best 2614009 combination zp ZP_BYTE:292 [ mode_stdchar::$27 ] +Uplifting [mode_stdchar] best 2619213 combination zp ZP_BYTE:292 [ mode_stdchar::$27 ] Attempting to uplift remaining variables inzp ZP_BYTE:16 [ mode_8bpppixelcell::i#2 mode_8bpppixelcell::i#1 ] -Uplifting [mode_8bpppixelcell] best 2612809 combination reg byte x [ mode_8bpppixelcell::i#2 mode_8bpppixelcell::i#1 ] +Uplifting [mode_8bpppixelcell] best 2618013 combination reg byte x [ mode_8bpppixelcell::i#2 mode_8bpppixelcell::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:31 [ mode_sixsfred::i#2 mode_sixsfred::i#1 ] -Uplifting [mode_sixsfred] best 2611609 combination reg byte x [ mode_sixsfred::i#2 mode_sixsfred::i#1 ] +Uplifting [mode_sixsfred] best 2616813 combination reg byte x [ mode_sixsfred::i#2 mode_sixsfred::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:44 [ mode_twoplanebitmap::i#2 mode_twoplanebitmap::i#1 ] -Uplifting [mode_twoplanebitmap] best 2610409 combination reg byte x [ mode_twoplanebitmap::i#2 mode_twoplanebitmap::i#1 ] +Uplifting [mode_twoplanebitmap] best 2615613 combination reg byte x [ mode_twoplanebitmap::i#2 mode_twoplanebitmap::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:57 [ mode_sixsfred2::i#2 mode_sixsfred2::i#1 ] -Uplifting [mode_sixsfred2] best 2609209 combination reg byte x [ mode_sixsfred2::i#2 mode_sixsfred2::i#1 ] +Uplifting [mode_sixsfred2] best 2614413 combination reg byte x [ mode_sixsfred2::i#2 mode_sixsfred2::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:70 [ mode_hicolmcchar::i#2 mode_hicolmcchar::i#1 ] +Uplifting [mode_hicolmcchar] best 2613213 combination reg byte x [ mode_hicolmcchar::i#2 mode_hicolmcchar::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:77 [ mode_hicolecmchar::i#2 mode_hicolecmchar::i#1 ] +Uplifting [mode_hicolecmchar] best 2612013 combination reg byte x [ mode_hicolecmchar::i#2 mode_hicolecmchar::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:84 [ mode_hicolstdchar::i#2 mode_hicolstdchar::i#1 ] +Uplifting [mode_hicolstdchar] best 2610813 combination reg byte x [ mode_hicolstdchar::i#2 mode_hicolstdchar::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:91 [ mode_stdbitmap::i#2 mode_stdbitmap::i#1 ] -Uplifting [mode_stdbitmap] best 2608009 combination reg byte x [ mode_stdbitmap::i#2 mode_stdbitmap::i#1 ] +Uplifting [mode_stdbitmap] best 2609613 combination reg byte x [ mode_stdbitmap::i#2 mode_stdbitmap::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:132 [ mode_mcchar::i#2 mode_mcchar::i#1 ] -Uplifting [mode_mcchar] best 2606809 combination reg byte x [ mode_mcchar::i#2 mode_mcchar::i#1 ] +Uplifting [mode_mcchar] best 2608413 combination reg byte x [ mode_mcchar::i#2 mode_mcchar::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:139 [ mode_ecmchar::i#2 mode_ecmchar::i#1 ] -Uplifting [mode_ecmchar] best 2605609 combination reg byte x [ mode_ecmchar::i#2 mode_ecmchar::i#1 ] +Uplifting [mode_ecmchar] best 2607213 combination reg byte x [ mode_ecmchar::i#2 mode_ecmchar::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:146 [ mode_stdchar::i#2 mode_stdchar::i#1 ] -Uplifting [mode_stdchar] best 2604409 combination reg byte x [ mode_stdchar::i#2 mode_stdchar::i#1 ] +Uplifting [mode_stdchar] best 2606013 combination reg byte x [ mode_stdchar::i#2 mode_stdchar::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:133 [ mode_mcchar::cy#4 mode_mcchar::cy#1 ] -Uplifting [mode_mcchar] best 2604409 combination zp ZP_BYTE:133 [ mode_mcchar::cy#4 mode_mcchar::cy#1 ] +Uplifting [mode_mcchar] best 2606013 combination zp ZP_BYTE:133 [ mode_mcchar::cy#4 mode_mcchar::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:140 [ mode_ecmchar::cy#4 mode_ecmchar::cy#1 ] -Uplifting [mode_ecmchar] best 2604409 combination zp ZP_BYTE:140 [ mode_ecmchar::cy#4 mode_ecmchar::cy#1 ] +Uplifting [mode_ecmchar] best 2606013 combination zp ZP_BYTE:140 [ mode_ecmchar::cy#4 mode_ecmchar::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:147 [ mode_stdchar::cy#4 mode_stdchar::cy#1 ] -Uplifting [mode_stdchar] best 2604409 combination zp ZP_BYTE:147 [ mode_stdchar::cy#4 mode_stdchar::cy#1 ] +Uplifting [mode_stdchar] best 2606013 combination zp ZP_BYTE:147 [ mode_stdchar::cy#4 mode_stdchar::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:32 [ mode_sixsfred::cy#4 mode_sixsfred::cy#1 ] -Uplifting [mode_sixsfred] best 2604409 combination zp ZP_BYTE:32 [ mode_sixsfred::cy#4 mode_sixsfred::cy#1 ] +Uplifting [mode_sixsfred] best 2606013 combination zp ZP_BYTE:32 [ mode_sixsfred::cy#4 mode_sixsfred::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:36 [ mode_sixsfred::ay#4 mode_sixsfred::ay#1 ] -Uplifting [mode_sixsfred] best 2604409 combination zp ZP_BYTE:36 [ mode_sixsfred::ay#4 mode_sixsfred::ay#1 ] +Uplifting [mode_sixsfred] best 2606013 combination zp ZP_BYTE:36 [ mode_sixsfred::ay#4 mode_sixsfred::ay#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:62 [ mode_sixsfred2::ay#4 mode_sixsfred2::ay#1 ] -Uplifting [mode_sixsfred2] best 2604409 combination zp ZP_BYTE:62 [ mode_sixsfred2::ay#4 mode_sixsfred2::ay#1 ] +Uplifting [mode_sixsfred2] best 2606013 combination zp ZP_BYTE:62 [ mode_sixsfred2::ay#4 mode_sixsfred2::ay#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:17 [ mode_8bpppixelcell::ay#4 mode_8bpppixelcell::ay#1 ] -Uplifting [mode_8bpppixelcell] best 2604409 combination zp ZP_BYTE:17 [ mode_8bpppixelcell::ay#4 mode_8bpppixelcell::ay#1 ] +Uplifting [mode_8bpppixelcell] best 2606013 combination zp ZP_BYTE:17 [ mode_8bpppixelcell::ay#4 mode_8bpppixelcell::ay#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:45 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cy#1 ] -Uplifting [mode_twoplanebitmap] best 2604409 combination zp ZP_BYTE:45 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cy#1 ] +Uplifting [mode_twoplanebitmap] best 2606013 combination zp ZP_BYTE:45 [ mode_twoplanebitmap::cy#4 mode_twoplanebitmap::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:58 [ mode_sixsfred2::cy#4 mode_sixsfred2::cy#1 ] -Uplifting [mode_sixsfred2] best 2604409 combination zp ZP_BYTE:58 [ mode_sixsfred2::cy#4 mode_sixsfred2::cy#1 ] +Uplifting [mode_sixsfred2] best 2606013 combination zp ZP_BYTE:58 [ mode_sixsfred2::cy#4 mode_sixsfred2::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:49 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ay#1 ] -Uplifting [mode_twoplanebitmap] best 2604409 combination zp ZP_BYTE:49 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ay#1 ] +Uplifting [mode_twoplanebitmap] best 2606013 combination zp ZP_BYTE:49 [ mode_twoplanebitmap::ay#4 mode_twoplanebitmap::ay#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:92 [ mode_stdbitmap::cy#4 mode_stdbitmap::cy#1 ] -Uplifting [mode_stdbitmap] best 2604409 combination zp ZP_BYTE:92 [ mode_stdbitmap::cy#4 mode_stdbitmap::cy#1 ] +Uplifting [mode_stdbitmap] best 2606013 combination zp ZP_BYTE:92 [ mode_stdbitmap::cy#4 mode_stdbitmap::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:96 [ mode_stdbitmap::l#2 mode_stdbitmap::l#1 ] -Uplifting [mode_stdbitmap] best 2604409 combination zp ZP_BYTE:96 [ mode_stdbitmap::l#2 mode_stdbitmap::l#1 ] +Uplifting [mode_stdbitmap] best 2606013 combination zp ZP_BYTE:96 [ mode_stdbitmap::l#2 mode_stdbitmap::l#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:71 [ mode_hicolmcchar::cy#4 mode_hicolmcchar::cy#1 ] -Uplifting [mode_hicolmcchar] best 2604409 combination zp ZP_BYTE:71 [ mode_hicolmcchar::cy#4 mode_hicolmcchar::cy#1 ] +Uplifting [mode_hicolmcchar] best 2606013 combination zp ZP_BYTE:71 [ mode_hicolmcchar::cy#4 mode_hicolmcchar::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:78 [ mode_hicolecmchar::cy#4 mode_hicolecmchar::cy#1 ] -Uplifting [mode_hicolecmchar] best 2604409 combination zp ZP_BYTE:78 [ mode_hicolecmchar::cy#4 mode_hicolecmchar::cy#1 ] +Uplifting [mode_hicolecmchar] best 2606013 combination zp ZP_BYTE:78 [ mode_hicolecmchar::cy#4 mode_hicolecmchar::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:85 [ mode_hicolstdchar::cy#4 mode_hicolstdchar::cy#1 ] -Uplifting [mode_hicolstdchar] best 2604409 combination zp ZP_BYTE:85 [ mode_hicolstdchar::cy#4 mode_hicolstdchar::cy#1 ] +Uplifting [mode_hicolstdchar] best 2606013 combination zp ZP_BYTE:85 [ mode_hicolstdchar::cy#4 mode_hicolstdchar::cy#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:7 [ mode_8bppchunkybmm::y#6 mode_8bppchunkybmm::y#1 ] -Uplifting [mode_8bppchunkybmm] best 2604409 combination zp ZP_BYTE:7 [ mode_8bppchunkybmm::y#6 mode_8bppchunkybmm::y#1 ] +Uplifting [mode_8bppchunkybmm] best 2606013 combination zp ZP_BYTE:7 [ mode_8bppchunkybmm::y#6 mode_8bppchunkybmm::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:161 [ keyboard_key_pressed::return#2 ] -Uplifting [keyboard_key_pressed] best 2603809 combination reg byte a [ keyboard_key_pressed::return#2 ] +Uplifting [keyboard_key_pressed] best 2605413 combination reg byte a [ keyboard_key_pressed::return#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:163 [ keyboard_key_pressed::return#24 ] -Uplifting [keyboard_key_pressed] best 2603209 combination reg byte a [ keyboard_key_pressed::return#24 ] +Uplifting [keyboard_key_pressed] best 2604813 combination reg byte a [ keyboard_key_pressed::return#24 ] Attempting to uplift remaining variables inzp ZP_BYTE:165 [ keyboard_key_pressed::return#25 ] -Uplifting [keyboard_key_pressed] best 2602609 combination reg byte a [ keyboard_key_pressed::return#25 ] +Uplifting [keyboard_key_pressed] best 2604213 combination reg byte a [ keyboard_key_pressed::return#25 ] Attempting to uplift remaining variables inzp ZP_BYTE:167 [ keyboard_key_pressed::return#26 ] -Uplifting [keyboard_key_pressed] best 2602009 combination reg byte a [ keyboard_key_pressed::return#26 ] +Uplifting [keyboard_key_pressed] best 2603613 combination reg byte a [ keyboard_key_pressed::return#26 ] +Attempting to uplift remaining variables inzp ZP_BYTE:168 [ menu::$41 ] +Uplifting [menu] best 2603213 combination reg byte a [ menu::$41 ] Attempting to uplift remaining variables inzp ZP_BYTE:169 [ keyboard_key_pressed::return#27 ] -Uplifting [keyboard_key_pressed] best 2601409 combination reg byte a [ keyboard_key_pressed::return#27 ] +Uplifting [keyboard_key_pressed] best 2602613 combination reg byte a [ keyboard_key_pressed::return#27 ] Attempting to uplift remaining variables inzp ZP_BYTE:170 [ menu::$45 ] -Uplifting [menu] best 2601009 combination reg byte a [ menu::$45 ] +Uplifting [menu] best 2602213 combination reg byte a [ menu::$45 ] Attempting to uplift remaining variables inzp ZP_BYTE:171 [ keyboard_key_pressed::return#28 ] -Uplifting [keyboard_key_pressed] best 2600409 combination reg byte a [ keyboard_key_pressed::return#28 ] +Uplifting [keyboard_key_pressed] best 2601613 combination reg byte a [ keyboard_key_pressed::return#28 ] Attempting to uplift remaining variables inzp ZP_BYTE:172 [ menu::$49 ] -Uplifting [menu] best 2600009 combination reg byte a [ menu::$49 ] +Uplifting [menu] best 2601213 combination reg byte a [ menu::$49 ] Attempting to uplift remaining variables inzp ZP_BYTE:173 [ keyboard_key_pressed::return#29 ] -Uplifting [keyboard_key_pressed] best 2599409 combination reg byte a [ keyboard_key_pressed::return#29 ] +Uplifting [keyboard_key_pressed] best 2600613 combination reg byte a [ keyboard_key_pressed::return#29 ] Attempting to uplift remaining variables inzp ZP_BYTE:174 [ menu::$53 ] -Uplifting [menu] best 2599009 combination reg byte a [ menu::$53 ] +Uplifting [menu] best 2600213 combination reg byte a [ menu::$53 ] Attempting to uplift remaining variables inzp ZP_BYTE:175 [ keyboard_key_pressed::return#30 ] -Uplifting [keyboard_key_pressed] best 2598409 combination reg byte a [ keyboard_key_pressed::return#30 ] +Uplifting [keyboard_key_pressed] best 2599613 combination reg byte a [ keyboard_key_pressed::return#30 ] Attempting to uplift remaining variables inzp ZP_BYTE:176 [ menu::$57 ] -Uplifting [menu] best 2598009 combination reg byte a [ menu::$57 ] +Uplifting [menu] best 2599213 combination reg byte a [ menu::$57 ] Attempting to uplift remaining variables inzp ZP_BYTE:177 [ keyboard_key_pressed::return#10 ] -Uplifting [keyboard_key_pressed] best 2597409 combination reg byte a [ keyboard_key_pressed::return#10 ] +Uplifting [keyboard_key_pressed] best 2598613 combination reg byte a [ keyboard_key_pressed::return#10 ] Attempting to uplift remaining variables inzp ZP_BYTE:178 [ menu::$61 ] -Uplifting [menu] best 2597009 combination reg byte a [ menu::$61 ] +Uplifting [menu] best 2598213 combination reg byte a [ menu::$61 ] Attempting to uplift remaining variables inzp ZP_BYTE:179 [ keyboard_key_pressed::return#11 ] -Uplifting [keyboard_key_pressed] best 2596409 combination reg byte a [ keyboard_key_pressed::return#11 ] +Uplifting [keyboard_key_pressed] best 2597613 combination reg byte a [ keyboard_key_pressed::return#11 ] Attempting to uplift remaining variables inzp ZP_BYTE:180 [ menu::$65 ] -Uplifting [menu] best 2596009 combination reg byte a [ menu::$65 ] +Uplifting [menu] best 2597213 combination reg byte a [ menu::$65 ] Attempting to uplift remaining variables inzp ZP_BYTE:181 [ keyboard_key_pressed::return#12 ] -Uplifting [keyboard_key_pressed] best 2595409 combination reg byte a [ keyboard_key_pressed::return#12 ] +Uplifting [keyboard_key_pressed] best 2596613 combination reg byte a [ keyboard_key_pressed::return#12 ] Attempting to uplift remaining variables inzp ZP_BYTE:182 [ menu::$69 ] -Uplifting [menu] best 2595009 combination reg byte a [ menu::$69 ] +Uplifting [menu] best 2596213 combination reg byte a [ menu::$69 ] Attempting to uplift remaining variables inzp ZP_BYTE:183 [ keyboard_key_pressed::return#13 ] -Uplifting [keyboard_key_pressed] best 2594409 combination reg byte a [ keyboard_key_pressed::return#13 ] +Uplifting [keyboard_key_pressed] best 2595613 combination reg byte a [ keyboard_key_pressed::return#13 ] Attempting to uplift remaining variables inzp ZP_BYTE:184 [ menu::$73 ] -Uplifting [menu] best 2594009 combination reg byte a [ menu::$73 ] +Uplifting [menu] best 2595213 combination reg byte a [ menu::$73 ] Attempting to uplift remaining variables inzp ZP_BYTE:188 [ keyboard_key_pressed::return#14 ] -Uplifting [keyboard_key_pressed] best 2593409 combination reg byte a [ keyboard_key_pressed::return#14 ] +Uplifting [keyboard_key_pressed] best 2594613 combination reg byte a [ keyboard_key_pressed::return#14 ] +Attempting to uplift remaining variables inzp ZP_BYTE:273 [ bitmap_init::$7 ] +Uplifting [bitmap_init] best 2594013 combination reg byte a [ bitmap_init::$7 ] +Attempting to uplift remaining variables inzp ZP_BYTE:274 [ bitmap_init::$8 ] +Uplifting [bitmap_init] best 2593413 combination reg byte a [ bitmap_init::$8 ] Attempting to uplift remaining variables inzp ZP_BYTE:275 [ bitmap_init::$9 ] -Uplifting [bitmap_init] best 2592809 combination reg byte a [ bitmap_init::$9 ] +Uplifting [bitmap_init] best 2592813 combination reg byte a [ bitmap_init::$9 ] Attempting to uplift remaining variables inzp ZP_BYTE:276 [ bitmap_init::$10 ] -Uplifting [bitmap_init] best 2592209 combination reg byte a [ bitmap_init::$10 ] +Uplifting [bitmap_init] best 2592213 combination reg byte a [ bitmap_init::$10 ] Attempting to uplift remaining variables inzp ZP_BYTE:40 [ mode_sixsfred::by#4 mode_sixsfred::by#1 ] -Uplifting [mode_sixsfred] best 2592209 combination zp ZP_BYTE:40 [ mode_sixsfred::by#4 mode_sixsfred::by#1 ] +Uplifting [mode_sixsfred] best 2592213 combination zp ZP_BYTE:40 [ mode_sixsfred::by#4 mode_sixsfred::by#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:53 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::by#1 ] -Uplifting [mode_twoplanebitmap] best 2592209 combination zp ZP_BYTE:53 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::by#1 ] +Uplifting [mode_twoplanebitmap] best 2592213 combination zp ZP_BYTE:53 [ mode_twoplanebitmap::by#4 mode_twoplanebitmap::by#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:66 [ mode_sixsfred2::by#4 mode_sixsfred2::by#1 ] -Uplifting [mode_sixsfred2] best 2592209 combination zp ZP_BYTE:66 [ mode_sixsfred2::by#4 mode_sixsfred2::by#1 ] +Uplifting [mode_sixsfred2] best 2592213 combination zp ZP_BYTE:66 [ mode_sixsfred2::by#4 mode_sixsfred2::by#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] -Uplifting [bitmap_clear] best 2592209 combination zp ZP_BYTE:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] +Uplifting [bitmap_clear] best 2592213 combination zp ZP_BYTE:123 [ bitmap_clear::y#4 bitmap_clear::y#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:21 [ mode_8bpppixelcell::ch#8 mode_8bpppixelcell::ch#1 ] -Uplifting [mode_8bpppixelcell] best 2592209 combination zp ZP_BYTE:21 [ mode_8bpppixelcell::ch#8 mode_8bpppixelcell::ch#1 ] +Uplifting [mode_8bpppixelcell] best 2592213 combination zp ZP_BYTE:21 [ mode_8bpppixelcell::ch#8 mode_8bpppixelcell::ch#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:98 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] -Uplifting [bitmap_line_ydxi] best 2592209 combination zp ZP_BYTE:98 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] +Uplifting [bitmap_line_ydxi] best 2592213 combination zp ZP_BYTE:98 [ bitmap_line_ydxi::yd#5 bitmap_line_ydxi::yd#1 bitmap_line_ydxi::yd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:106 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] -Uplifting [bitmap_line_xdyi] best 2592209 combination zp ZP_BYTE:106 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] +Uplifting [bitmap_line_xdyi] best 2592213 combination zp ZP_BYTE:106 [ bitmap_line_xdyi::xd#5 bitmap_line_xdyi::xd#0 bitmap_line_xdyi::xd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:112 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#1 bitmap_line_ydxd::yd#0 ] -Uplifting [bitmap_line_ydxd] best 2592209 combination zp ZP_BYTE:112 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#1 bitmap_line_ydxd::yd#0 ] +Uplifting [bitmap_line_ydxd] best 2592213 combination zp ZP_BYTE:112 [ bitmap_line_ydxd::yd#5 bitmap_line_ydxd::yd#1 bitmap_line_ydxd::yd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:118 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] -Uplifting [bitmap_line_xdyd] best 2592209 combination zp ZP_BYTE:118 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] +Uplifting [bitmap_line_xdyd] best 2592213 combination zp ZP_BYTE:118 [ bitmap_line_xdyd::xd#5 bitmap_line_xdyd::xd#0 bitmap_line_xdyd::xd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:272 [ bitmap_init::$6 ] -Uplifting [bitmap_init] best 2592209 combination zp ZP_BYTE:272 [ bitmap_init::$6 ] +Uplifting [bitmap_init] best 2592213 combination zp ZP_BYTE:272 [ bitmap_init::$6 ] Attempting to uplift remaining variables inzp ZP_BYTE:97 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] -Uplifting [bitmap_line_ydxi] best 2592209 combination zp ZP_BYTE:97 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] +Uplifting [bitmap_line_ydxi] best 2592213 combination zp ZP_BYTE:97 [ bitmap_line_ydxi::xd#2 bitmap_line_ydxi::xd#1 bitmap_line_ydxi::xd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:105 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] -Uplifting [bitmap_line_xdyi] best 2592209 combination zp ZP_BYTE:105 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] +Uplifting [bitmap_line_xdyi] best 2592213 combination zp ZP_BYTE:105 [ bitmap_line_xdyi::yd#2 bitmap_line_xdyi::yd#0 bitmap_line_xdyi::yd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:111 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#1 bitmap_line_ydxd::xd#0 ] -Uplifting [bitmap_line_ydxd] best 2592209 combination zp ZP_BYTE:111 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#1 bitmap_line_ydxd::xd#0 ] +Uplifting [bitmap_line_ydxd] best 2592213 combination zp ZP_BYTE:111 [ bitmap_line_ydxd::xd#2 bitmap_line_ydxd::xd#1 bitmap_line_ydxd::xd#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:117 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] -Uplifting [bitmap_line_xdyd] best 2592209 combination zp ZP_BYTE:117 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] +Uplifting [bitmap_line_xdyd] best 2592213 combination zp ZP_BYTE:117 [ bitmap_line_xdyd::yd#2 bitmap_line_xdyd::yd#0 bitmap_line_xdyd::yd#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:99 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] -Uplifting [bitmap_line_ydxi] best 2592209 combination zp ZP_BYTE:99 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] +Uplifting [bitmap_line_ydxi] best 2592213 combination zp ZP_BYTE:99 [ bitmap_line_ydxi::y1#6 bitmap_line_ydxi::y1#1 bitmap_line_ydxi::y1#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:107 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] -Uplifting [bitmap_line_xdyi] best 2592209 combination zp ZP_BYTE:107 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] +Uplifting [bitmap_line_xdyi] best 2592213 combination zp ZP_BYTE:107 [ bitmap_line_xdyi::x1#6 bitmap_line_xdyi::x1#0 bitmap_line_xdyi::x1#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:113 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#1 bitmap_line_ydxd::y1#0 ] -Uplifting [bitmap_line_ydxd] best 2592209 combination zp ZP_BYTE:113 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#1 bitmap_line_ydxd::y1#0 ] +Uplifting [bitmap_line_ydxd] best 2592213 combination zp ZP_BYTE:113 [ bitmap_line_ydxd::y1#6 bitmap_line_ydxd::y1#1 bitmap_line_ydxd::y1#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:119 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] -Uplifting [bitmap_line_xdyd] best 2592209 combination zp ZP_BYTE:119 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] +Uplifting [bitmap_line_xdyd] best 2592213 combination zp ZP_BYTE:119 [ bitmap_line_xdyd::x1#6 bitmap_line_xdyd::x1#0 bitmap_line_xdyd::x1#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:209 [ keyboard_key_pressed::return#0 ] -Uplifting [keyboard_key_pressed] best 2588285 combination reg byte a [ keyboard_key_pressed::return#0 ] +Uplifting [keyboard_key_pressed] best 2588289 combination reg byte a [ keyboard_key_pressed::return#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:13 [ mode_ctrl_keys::ctrl#14 mode_ctrl_keys::ctrl#22 mode_ctrl_keys::ctrl#6 mode_ctrl_keys::ctrl#13 mode_ctrl_keys::ctrl#5 mode_ctrl_keys::ctrl#12 mode_ctrl_keys::ctrl#4 mode_ctrl_keys::ctrl#11 mode_ctrl_keys::ctrl#3 mode_ctrl_keys::ctrl#10 mode_ctrl_keys::ctrl#2 mode_ctrl_keys::ctrl#17 mode_ctrl_keys::ctrl#1 mode_ctrl_keys::ctrl#0 ] -Uplifting [mode_ctrl_keys] best 2588285 combination zp ZP_BYTE:13 [ mode_ctrl_keys::ctrl#14 mode_ctrl_keys::ctrl#22 mode_ctrl_keys::ctrl#6 mode_ctrl_keys::ctrl#13 mode_ctrl_keys::ctrl#5 mode_ctrl_keys::ctrl#12 mode_ctrl_keys::ctrl#4 mode_ctrl_keys::ctrl#11 mode_ctrl_keys::ctrl#3 mode_ctrl_keys::ctrl#10 mode_ctrl_keys::ctrl#2 mode_ctrl_keys::ctrl#17 mode_ctrl_keys::ctrl#1 mode_ctrl_keys::ctrl#0 ] +Uplifting [mode_ctrl_keys] best 2588289 combination zp ZP_BYTE:13 [ mode_ctrl_keys::ctrl#14 mode_ctrl_keys::ctrl#22 mode_ctrl_keys::ctrl#6 mode_ctrl_keys::ctrl#13 mode_ctrl_keys::ctrl#5 mode_ctrl_keys::ctrl#12 mode_ctrl_keys::ctrl#4 mode_ctrl_keys::ctrl#11 mode_ctrl_keys::ctrl#3 mode_ctrl_keys::ctrl#10 mode_ctrl_keys::ctrl#2 mode_ctrl_keys::ctrl#17 mode_ctrl_keys::ctrl#1 mode_ctrl_keys::ctrl#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:250 [ bitmap_line::y0#0 ] -Uplifting [bitmap_line] best 2588285 combination zp ZP_BYTE:250 [ bitmap_line::y0#0 ] +Uplifting [bitmap_line] best 2588289 combination zp ZP_BYTE:250 [ bitmap_line::y0#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:249 [ bitmap_line::x1#0 ] -Uplifting [bitmap_line] best 2588285 combination zp ZP_BYTE:249 [ bitmap_line::x1#0 ] +Uplifting [bitmap_line] best 2588289 combination zp ZP_BYTE:249 [ bitmap_line::x1#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:248 [ bitmap_line::x0#0 ] -Uplifting [bitmap_line] best 2588285 combination zp ZP_BYTE:248 [ bitmap_line::x0#0 ] +Uplifting [bitmap_line] best 2588289 combination zp ZP_BYTE:248 [ bitmap_line::x0#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:190 [ keyboard_key_pressed::return#15 ] -Uplifting [keyboard_key_pressed] best 2588279 combination reg byte a [ keyboard_key_pressed::return#15 ] +Uplifting [keyboard_key_pressed] best 2588283 combination reg byte a [ keyboard_key_pressed::return#15 ] Attempting to uplift remaining variables inzp ZP_BYTE:192 [ keyboard_key_pressed::return#16 ] -Uplifting [keyboard_key_pressed] best 2588273 combination reg byte a [ keyboard_key_pressed::return#16 ] +Uplifting [keyboard_key_pressed] best 2588277 combination reg byte a [ keyboard_key_pressed::return#16 ] Attempting to uplift remaining variables inzp ZP_BYTE:194 [ keyboard_key_pressed::return#17 ] -Uplifting [keyboard_key_pressed] best 2588267 combination reg byte a [ keyboard_key_pressed::return#17 ] +Uplifting [keyboard_key_pressed] best 2588271 combination reg byte a [ keyboard_key_pressed::return#17 ] Attempting to uplift remaining variables inzp ZP_BYTE:196 [ keyboard_key_pressed::return#18 ] -Uplifting [keyboard_key_pressed] best 2588261 combination reg byte a [ keyboard_key_pressed::return#18 ] +Uplifting [keyboard_key_pressed] best 2588265 combination reg byte a [ keyboard_key_pressed::return#18 ] +Attempting to uplift remaining variables inzp ZP_BYTE:197 [ mode_ctrl_keys::$14 ] +Uplifting [mode_ctrl_keys] best 2588261 combination reg byte a [ mode_ctrl_keys::$14 ] Attempting to uplift remaining variables inzp ZP_BYTE:198 [ keyboard_key_pressed::return#19 ] Uplifting [keyboard_key_pressed] best 2588255 combination reg byte a [ keyboard_key_pressed::return#19 ] Attempting to uplift remaining variables inzp ZP_BYTE:199 [ mode_ctrl_keys::$18 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/chargen-analysis.log b/src/test/java/dk/camelot64/kickc/test/ref/chargen-analysis.log index 3ce8ad3d9..7dd878005 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/chargen-analysis.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/chargen-analysis.log @@ -5647,27 +5647,35 @@ Uplift Scope [print_str_at] 35.5: zp ZP_WORD:26 [ print_str_at::str#5 print_str_ Uplift Scope [keyboard_matrix_read] 4: zp ZP_BYTE:56 [ keyboard_matrix_read::rowid#0 ] 4: zp ZP_BYTE:57 [ keyboard_matrix_read::return#2 ] 1.33: zp ZP_BYTE:60 [ keyboard_matrix_read::return#0 ] Uplift Scope [] -Uplifting [plot_chargen] best 815083 combination reg byte a [ plot_chargen::$10 ] reg byte x [ plot_chargen::x#2 plot_chargen::x#1 ] zp ZP_BYTE:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ] zp ZP_WORD:16 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 ] reg byte a [ plot_chargen::c#2 ] zp ZP_BYTE:14 [ plot_chargen::y#2 plot_chargen::y#1 ] reg byte x [ plot_chargen::shift#2 plot_chargen::shift#1 ] reg byte a [ plot_chargen::ch#2 plot_chargen::ch#1 ] zp ZP_BYTE:11 [ plot_chargen::pos#2 plot_chargen::pos#0 plot_chargen::pos#1 ] zp ZP_WORD:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 ] zp ZP_WORD:44 [ plot_chargen::$0 ] zp ZP_WORD:46 [ plot_chargen::$1 ] zp ZP_WORD:50 [ plot_chargen::$8 ] -Limited combination testing to 1000 combinations of 4608 possible. -Uplifting [mul8u] best 810080 combination zp ZP_WORD:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] zp ZP_WORD:23 [ mul8u::mb#2 mul8u::mb#1 ] reg byte a [ mul8u::$1 ] reg byte x [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] zp ZP_WORD:48 [ mul8u::return#2 ] -Uplifting [main] best 808400 combination reg byte a [ main::pressed#2 main::pressed#1 ] zp ZP_BYTE:7 [ main::ch#2 main::ch#1 ] reg byte a [ main::key#0 ] zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] zp ZP_BYTE:4 [ main::i#2 main::i#1 ] reg byte a [ main::$15 ] reg byte a [ main::$18 ] zp ZP_BYTE:35 [ main::$21 ] zp ZP_BYTE:37 [ main::$24 ] zp ZP_BYTE:39 [ main::$27 ] zp ZP_BYTE:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#12 ] zp ZP_BYTE:6 [ main::shift#10 ] -Limited combination testing to 1000 combinations of 262144 possible. -Uplifting [keyboard_key_pressed] best 807503 combination reg byte x [ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ] reg byte a [ keyboard_key_pressed::return#14 ] reg byte a [ keyboard_key_pressed::return#2 ] reg byte a [ keyboard_key_pressed::return#10 ] reg byte a [ keyboard_key_pressed::return#11 ] zp ZP_BYTE:36 [ keyboard_key_pressed::return#12 ] zp ZP_BYTE:38 [ keyboard_key_pressed::return#13 ] zp ZP_BYTE:59 [ keyboard_key_pressed::return#0 ] zp ZP_BYTE:55 [ keyboard_key_pressed::rowidx#0 ] zp ZP_BYTE:58 [ keyboard_key_pressed::$2 ] zp ZP_BYTE:54 [ keyboard_key_pressed::colidx#0 ] -Limited combination testing to 1000 combinations of 2359296 possible. -Uplifting [keyboard_get_keycode] best 806297 combination reg byte a [ keyboard_get_keycode::return#2 ] reg byte x [ keyboard_get_keycode::ch#0 ] reg byte a [ keyboard_get_keycode::return#0 ] -Uplifting [print_str_at] best 806297 combination zp ZP_WORD:26 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ] zp ZP_WORD:28 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ] -Uplifting [keyboard_matrix_read] best 806279 combination reg byte x [ keyboard_matrix_read::rowid#0 ] reg byte a [ keyboard_matrix_read::return#2 ] reg byte a [ keyboard_matrix_read::return#0 ] -Uplifting [] best 806279 combination +Uplifting [plot_chargen] best 815693 combination reg byte a [ plot_chargen::$10 ] reg byte x [ plot_chargen::x#2 plot_chargen::x#1 ] zp ZP_BYTE:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ] zp ZP_WORD:16 [ plot_chargen::sc#3 plot_chargen::sc#7 plot_chargen::sc#2 plot_chargen::sc#0 plot_chargen::sc#1 ] reg byte a [ plot_chargen::c#2 ] zp ZP_BYTE:14 [ plot_chargen::y#2 plot_chargen::y#1 ] zp ZP_BYTE:10 [ plot_chargen::shift#2 plot_chargen::shift#1 ] zp ZP_BYTE:9 [ plot_chargen::ch#2 plot_chargen::ch#1 ] zp ZP_BYTE:11 [ plot_chargen::pos#2 plot_chargen::pos#0 plot_chargen::pos#1 ] zp ZP_WORD:12 [ plot_chargen::chargen#5 plot_chargen::chargen#0 plot_chargen::chargen#1 ] zp ZP_WORD:44 [ plot_chargen::$0 ] zp ZP_WORD:46 [ plot_chargen::$1 ] zp ZP_WORD:50 [ plot_chargen::$8 ] +Limited combination testing to 100 combinations of 4608 possible. +Uplifting [mul8u] best 810690 combination zp ZP_WORD:21 [ mul8u::res#2 mul8u::res#6 mul8u::res#1 ] zp ZP_WORD:23 [ mul8u::mb#2 mul8u::mb#1 ] reg byte a [ mul8u::$1 ] reg byte x [ mul8u::a#2 mul8u::a#1 mul8u::a#0 ] zp ZP_WORD:48 [ mul8u::return#2 ] +Uplifting [main] best 809050 combination reg byte a [ main::pressed#2 main::pressed#1 ] zp ZP_BYTE:7 [ main::ch#2 main::ch#1 ] reg byte a [ main::key#0 ] zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] zp ZP_BYTE:4 [ main::i#2 main::i#1 ] reg byte a [ main::$15 ] zp ZP_BYTE:33 [ main::$18 ] zp ZP_BYTE:35 [ main::$21 ] zp ZP_BYTE:37 [ main::$24 ] zp ZP_BYTE:39 [ main::$27 ] zp ZP_BYTE:5 [ main::cur_pos#18 main::cur_pos#20 main::cur_pos#22 main::cur_pos#24 main::cur_pos#12 ] zp ZP_BYTE:6 [ main::shift#10 ] +Limited combination testing to 100 combinations of 262144 possible. +Uplifting [keyboard_key_pressed] best 808213 combination reg byte x [ keyboard_key_pressed::key#6 keyboard_key_pressed::key#5 ] reg byte a [ keyboard_key_pressed::return#14 ] reg byte a [ keyboard_key_pressed::return#2 ] reg byte a [ keyboard_key_pressed::return#10 ] zp ZP_BYTE:34 [ keyboard_key_pressed::return#11 ] zp ZP_BYTE:36 [ keyboard_key_pressed::return#12 ] zp ZP_BYTE:38 [ keyboard_key_pressed::return#13 ] zp ZP_BYTE:59 [ keyboard_key_pressed::return#0 ] zp ZP_BYTE:55 [ keyboard_key_pressed::rowidx#0 ] zp ZP_BYTE:58 [ keyboard_key_pressed::$2 ] zp ZP_BYTE:54 [ keyboard_key_pressed::colidx#0 ] +Limited combination testing to 100 combinations of 2359296 possible. +Uplifting [keyboard_get_keycode] best 807007 combination reg byte a [ keyboard_get_keycode::return#2 ] reg byte x [ keyboard_get_keycode::ch#0 ] reg byte a [ keyboard_get_keycode::return#0 ] +Uplifting [print_str_at] best 807007 combination zp ZP_WORD:26 [ print_str_at::str#5 print_str_at::str#7 print_str_at::str#4 ] zp ZP_WORD:28 [ print_str_at::at#5 print_str_at::at#7 print_str_at::at#4 ] +Uplifting [keyboard_matrix_read] best 806989 combination reg byte x [ keyboard_matrix_read::rowid#0 ] reg byte a [ keyboard_matrix_read::return#2 ] reg byte a [ keyboard_matrix_read::return#0 ] +Uplifting [] best 806989 combination Attempting to uplift remaining variables inzp ZP_BYTE:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ] -Uplifting [plot_chargen] best 806279 combination zp ZP_BYTE:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ] +Uplifting [plot_chargen] best 806989 combination zp ZP_BYTE:15 [ plot_chargen::bits#2 plot_chargen::bits#0 plot_chargen::bits#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:14 [ plot_chargen::y#2 plot_chargen::y#1 ] -Uplifting [plot_chargen] best 806279 combination zp ZP_BYTE:14 [ plot_chargen::y#2 plot_chargen::y#1 ] +Uplifting [plot_chargen] best 806989 combination zp ZP_BYTE:14 [ plot_chargen::y#2 plot_chargen::y#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:10 [ plot_chargen::shift#2 plot_chargen::shift#1 ] +Uplifting [plot_chargen] best 806685 combination reg byte x [ plot_chargen::shift#2 plot_chargen::shift#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:7 [ main::ch#2 main::ch#1 ] -Uplifting [main] best 806279 combination zp ZP_BYTE:7 [ main::ch#2 main::ch#1 ] +Uplifting [main] best 806685 combination zp ZP_BYTE:7 [ main::ch#2 main::ch#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:9 [ plot_chargen::ch#2 plot_chargen::ch#1 ] +Uplifting [plot_chargen] best 806379 combination reg byte a [ plot_chargen::ch#2 plot_chargen::ch#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:11 [ plot_chargen::pos#2 plot_chargen::pos#0 plot_chargen::pos#1 ] -Uplifting [plot_chargen] best 805950 combination reg byte y [ plot_chargen::pos#2 plot_chargen::pos#0 plot_chargen::pos#1 ] +Uplifting [plot_chargen] best 806050 combination reg byte y [ plot_chargen::pos#2 plot_chargen::pos#0 plot_chargen::pos#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:4 [ main::i#2 main::i#1 ] -Uplifting [main] best 805950 combination zp ZP_BYTE:4 [ main::i#2 main::i#1 ] +Uplifting [main] best 806050 combination zp ZP_BYTE:4 [ main::i#2 main::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:33 [ main::$18 ] +Uplifting [main] best 806010 combination reg byte a [ main::$18 ] +Attempting to uplift remaining variables inzp ZP_BYTE:34 [ keyboard_key_pressed::return#11 ] +Uplifting [keyboard_key_pressed] best 805950 combination reg byte a [ keyboard_key_pressed::return#11 ] Attempting to uplift remaining variables inzp ZP_BYTE:35 [ main::$21 ] Uplifting [main] best 805910 combination reg byte a [ main::$21 ] Attempting to uplift remaining variables inzp ZP_BYTE:36 [ keyboard_key_pressed::return#12 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/chargen.log b/src/test/java/dk/camelot64/kickc/test/ref/chargen.log index b6eedc21b..0a6a97a25 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/chargen.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/chargen.log @@ -789,6 +789,7 @@ Uplift Scope [main] 202: zp ZP_BYTE:8 [ main::$1 ] 176.75: zp ZP_BYTE:6 [ main:: Uplift Scope [] Uplifting [main] best 7232 combination reg byte a [ main::$1 ] reg byte x [ main::x#2 main::x#1 ] zp ZP_BYTE:3 [ main::bits#2 main::bits#0 main::bits#1 ] zp ZP_WORD:4 [ main::sc#3 main::sc#7 main::sc#2 main::sc#1 ] reg byte a [ main::c#2 ] zp ZP_BYTE:2 [ main::y#2 main::y#1 ] +Limited combination testing to 100 combinations of 128 possible. Uplifting [] best 7232 combination Attempting to uplift remaining variables inzp ZP_BYTE:3 [ main::bits#2 main::bits#0 main::bits#1 ] Uplifting [main] best 7232 combination zp ZP_BYTE:3 [ main::bits#2 main::bits#0 main::bits#1 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.log b/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.log index 2829a698a..cc704539c 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/flipper-rex2.log @@ -1513,6 +1513,7 @@ Uplift Scope [prepare] 38.5: zp ZP_BYTE:13 [ prepare::i#2 prepare::i#1 ] Uplift Scope [] Uplifting [flip] best 141722 combination reg byte y [ flip::srcIdx#2 flip::srcIdx#3 flip::srcIdx#1 ] reg byte x [ flip::dstIdx#3 flip::dstIdx#5 flip::dstIdx#2 flip::dstIdx#1 ] zp ZP_BYTE:11 [ flip::c#2 flip::c#1 ] reg byte x [ flip::i#2 flip::i#1 ] zp ZP_BYTE:8 [ flip::r#4 flip::r#1 ] +Limited combination testing to 100 combinations of 243 possible. Uplifting [plot] best 123422 combination reg byte y [ plot::x#2 plot::x#1 ] reg byte x [ plot::i#2 plot::i#3 plot::i#1 ] zp ZP_WORD:3 [ plot::line#4 plot::line#1 ] zp ZP_BYTE:5 [ plot::y#4 plot::y#1 ] Uplifting [main] best 120022 combination reg byte x [ main::c#4 main::c#1 ] Uplifting [prepare] best 119922 combination reg byte x [ prepare::i#2 prepare::i#1 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/keyboard-glitch.log b/src/test/java/dk/camelot64/kickc/test/ref/keyboard-glitch.log index 6d451977e..ad864cbbf 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/keyboard-glitch.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/keyboard-glitch.log @@ -2290,13 +2290,15 @@ Uplift Scope [keyboard_matrix_read] 4: zp ZP_BYTE:11 [ keyboard_matrix_read::row Uplift Scope [main] Uplift Scope [] -Uplifting [keyboard_key_pressed] best 9150 combination reg byte a [ keyboard_key_pressed::return#2 ] reg byte a [ keyboard_key_pressed::return#3 ] reg byte a [ keyboard_key_pressed::return#4 ] reg byte a [ keyboard_key_pressed::return#10 ] reg byte a [ keyboard_key_pressed::return#0 ] zp ZP_BYTE:10 [ keyboard_key_pressed::rowidx#0 ] zp ZP_BYTE:13 [ keyboard_key_pressed::$2 ] zp ZP_BYTE:2 [ keyboard_key_pressed::key#4 ] zp ZP_BYTE:9 [ keyboard_key_pressed::colidx#0 ] -Limited combination testing to 1000 combinations of 147456 possible. -Uplifting [menu] best 7950 combination reg byte a [ menu::$0 ] reg byte a [ menu::$4 ] reg byte a [ menu::$7 ] -Uplifting [pressed] best 7550 combination reg byte a [ pressed::$0 ] -Uplifting [keyboard_matrix_read] best 7532 combination reg byte x [ keyboard_matrix_read::rowid#0 ] reg byte a [ keyboard_matrix_read::return#2 ] reg byte a [ keyboard_matrix_read::return#0 ] -Uplifting [main] best 7532 combination -Uplifting [] best 7532 combination +Uplifting [keyboard_key_pressed] best 10353 combination reg byte a [ keyboard_key_pressed::return#2 ] reg byte a [ keyboard_key_pressed::return#3 ] reg byte a [ keyboard_key_pressed::return#4 ] reg byte a [ keyboard_key_pressed::return#10 ] zp ZP_BYTE:14 [ keyboard_key_pressed::return#0 ] zp ZP_BYTE:10 [ keyboard_key_pressed::rowidx#0 ] zp ZP_BYTE:13 [ keyboard_key_pressed::$2 ] zp ZP_BYTE:2 [ keyboard_key_pressed::key#4 ] zp ZP_BYTE:9 [ keyboard_key_pressed::colidx#0 ] +Limited combination testing to 100 combinations of 147456 possible. +Uplifting [menu] best 9153 combination reg byte a [ menu::$0 ] reg byte a [ menu::$4 ] reg byte a [ menu::$7 ] +Uplifting [pressed] best 8753 combination reg byte a [ pressed::$0 ] +Uplifting [keyboard_matrix_read] best 8735 combination reg byte x [ keyboard_matrix_read::rowid#0 ] reg byte a [ keyboard_matrix_read::return#2 ] reg byte a [ keyboard_matrix_read::return#0 ] +Uplifting [main] best 8735 combination +Uplifting [] best 8735 combination +Attempting to uplift remaining variables inzp ZP_BYTE:14 [ keyboard_key_pressed::return#0 ] +Uplifting [keyboard_key_pressed] best 7532 combination reg byte a [ keyboard_key_pressed::return#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:10 [ keyboard_key_pressed::rowidx#0 ] Uplifting [keyboard_key_pressed] best 7528 combination reg byte a [ keyboard_key_pressed::rowidx#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:13 [ keyboard_key_pressed::$2 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/liverange.log b/src/test/java/dk/camelot64/kickc/test/ref/liverange.log index df1061475..3ff7958f5 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/liverange.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/liverange.log @@ -542,6 +542,7 @@ Uplift Scope [inci] 4: zp ZP_BYTE:3 [ inci::return#0 ] 4: zp ZP_BYTE:6 [ inci::r Uplift Scope [] 4.73: zp ZP_BYTE:2 [ i#10 i#11 ] Uplifting [main] best 112 combination reg byte a [ main::$0 ] reg byte a [ main::$2 ] reg byte x [ main::a#2 ] zp ZP_BYTE:5 [ main::a#1 ] +Limited combination testing to 100 combinations of 192 possible. Uplifting [inci] best 91 combination reg byte a [ inci::return#0 ] reg byte a [ inci::return#1 ] reg byte a [ inci::return#2 ] Uplifting [] best 82 combination reg byte y [ i#10 i#11 ] Attempting to uplift remaining variables inzp ZP_BYTE:5 [ main::a#1 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/modglobal.asm b/src/test/java/dk/camelot64/kickc/test/ref/modglobal.asm index e6bdff600..e3a31ff52 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/modglobal.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/modglobal.asm @@ -2,24 +2,26 @@ :BasicUpstart(main) .pc = $80d "Program" .label SCREEN = $400 - .label cnt3 = 2 + .label cnt = 2 jsr main main: { - lda #0 - sta cnt3 - tay - tax + ldx #0 + ldy #0 + txa jsr inccnt sta SCREEN+0 - inx + lda cnt + clc + adc #1 jsr inccnt sta SCREEN+1 rts } inccnt: { - inx + clc + adc #1 + sta cnt iny - inc cnt3 - txa + inx rts } diff --git a/src/test/java/dk/camelot64/kickc/test/ref/modglobal.log b/src/test/java/dk/camelot64/kickc/test/ref/modglobal.log index a64836c7b..577e44e42 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/modglobal.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/modglobal.log @@ -652,12 +652,13 @@ Uplift Scope [] 8: zp ZP_BYTE:2 [ cnt#11 cnt#2 ] 2.44: zp ZP_BYTE:3 [ cnt2#10 cn Uplift Scope [inccnt] 4: zp ZP_BYTE:5 [ inccnt::return#0 ] 4: zp ZP_BYTE:7 [ inccnt::return#1 ] 1.5: zp ZP_BYTE:10 [ inccnt::return#2 ] Uplift Scope [main] 4: zp ZP_BYTE:6 [ main::$0 ] 4: zp ZP_BYTE:8 [ main::$1 ] -Uplifting [] best 109 combination reg byte x [ cnt#11 cnt#2 ] reg byte y [ cnt2#10 cnt2#11 ] zp ZP_BYTE:4 [ cnt3#10 cnt3#11 ] reg byte x [ cnt#12 ] -Uplifting [inccnt] best 90 combination reg byte a [ inccnt::return#0 ] reg byte a [ inccnt::return#1 ] reg byte a [ inccnt::return#2 ] -Uplifting [main] best 78 combination reg byte a [ main::$0 ] reg byte a [ main::$1 ] -Attempting to uplift remaining variables inzp ZP_BYTE:4 [ cnt3#10 cnt3#11 ] -Uplifting [] best 78 combination zp ZP_BYTE:4 [ cnt3#10 cnt3#11 ] -Allocated (was zp ZP_BYTE:4) zp ZP_BYTE:2 [ cnt3#10 cnt3#11 ] +Uplifting [] best 116 combination reg byte a [ cnt#11 cnt#2 ] reg byte y [ cnt2#10 cnt2#11 ] reg byte x [ cnt3#10 cnt3#11 ] zp ZP_BYTE:9 [ cnt#12 ] +Limited combination testing to 100 combinations of 256 possible. +Uplifting [inccnt] best 95 combination reg byte a [ inccnt::return#0 ] reg byte a [ inccnt::return#1 ] reg byte a [ inccnt::return#2 ] +Uplifting [main] best 83 combination reg byte a [ main::$0 ] reg byte a [ main::$1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:9 [ cnt#12 ] +Uplifting [] best 83 combination zp ZP_BYTE:9 [ cnt#12 ] +Allocated (was zp ZP_BYTE:9) zp ZP_BYTE:2 [ cnt#12 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart @@ -666,7 +667,7 @@ ASSEMBLER BEFORE OPTIMIZATION .pc = $80d "Program" //SEG1 Global Constants & labels .label SCREEN = $400 - .label cnt3 = 2 + .label cnt = 2 //SEG2 @begin bbegin: //SEG3 [1] phi from @begin to @2 [phi:@begin->@2] @@ -688,13 +689,12 @@ main: { //SEG10 [5] call inccnt param-assignment [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ) //SEG11 [15] phi from main to inccnt [phi:main->inccnt] inccnt_from_main: - //SEG12 [15] phi (byte) cnt3#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#0] -- vbuz1=vbuc1 - lda #0 - sta cnt3 + //SEG12 [15] phi (byte) cnt3#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#0] -- vbuxx=vbuc1 + ldx #0 //SEG13 [15] phi (byte) cnt2#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#1] -- vbuyy=vbuc1 ldy #0 - //SEG14 [15] phi (byte) cnt#11 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#2] -- vbuxx=vbuc1 - ldx #0 + //SEG14 [15] phi (byte) cnt#11 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#2] -- vbuaa=vbuc1 + lda #0 jsr inccnt //SEG15 [6] (byte) inccnt::return#0 ← (byte) inccnt::return#2 [ inccnt::return#0 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ inccnt::return#0 cnt#12 cnt2#11 cnt3#11 ] ) // (byte) inccnt::return#0 = (byte) inccnt::return#2 // register copy reg byte a @@ -705,8 +705,10 @@ main: { // (byte~) main::$0 = (byte) inccnt::return#0 // register copy reg byte a //SEG18 [8] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) main::$0 [ cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ cnt#12 cnt2#11 cnt3#11 ] ) -- _deref_pbuc1=vbuaa sta SCREEN+0 - //SEG19 [9] (byte) cnt#2 ← ++ (byte) cnt#12 [ cnt#2 cnt2#11 cnt3#11 ] ( main:2 [ cnt#2 cnt2#11 cnt3#11 ] ) -- vbuxx=_inc_vbuxx - inx + //SEG19 [9] (byte) cnt#2 ← ++ (byte) cnt#12 [ cnt#2 cnt2#11 cnt3#11 ] ( main:2 [ cnt#2 cnt2#11 cnt3#11 ] ) -- vbuaa=_inc_vbuz1 + lda cnt + clc + adc #1 //SEG20 [10] call inccnt param-assignment [ inccnt::return#2 ] ( main:2 [ inccnt::return#2 ] ) //SEG21 [15] phi from main::@1 to inccnt [phi:main::@1->inccnt] inccnt_from_b1: @@ -731,14 +733,16 @@ main: { } //SEG31 inccnt inccnt: { - //SEG32 [16] (byte) cnt#12 ← ++ (byte) cnt#11 [ cnt#12 cnt2#10 cnt3#10 ] ( main:2::inccnt:5 [ cnt#12 cnt2#10 cnt3#10 ] main:2::inccnt:10 [ cnt#12 cnt2#10 cnt3#10 ] ) -- vbuxx=_inc_vbuxx - inx + //SEG32 [16] (byte) cnt#12 ← ++ (byte) cnt#11 [ cnt#12 cnt2#10 cnt3#10 ] ( main:2::inccnt:5 [ cnt#12 cnt2#10 cnt3#10 ] main:2::inccnt:10 [ cnt#12 cnt2#10 cnt3#10 ] ) -- vbuz1=_inc_vbuaa + clc + adc #1 + sta cnt //SEG33 [17] (byte) cnt2#11 ← ++ (byte) cnt2#10 [ cnt#12 cnt3#10 cnt2#11 ] ( main:2::inccnt:5 [ cnt#12 cnt3#10 cnt2#11 ] main:2::inccnt:10 [ cnt#12 cnt3#10 cnt2#11 ] ) -- vbuyy=_inc_vbuyy iny - //SEG34 [18] (byte) cnt3#11 ← ++ (byte) cnt3#10 [ cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ cnt#12 cnt2#11 cnt3#11 ] ) -- vbuz1=_inc_vbuz1 - inc cnt3 - //SEG35 [19] (byte) inccnt::return#2 ← (byte) cnt#12 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ) -- vbuaa=vbuxx - txa + //SEG34 [18] (byte) cnt3#11 ← ++ (byte) cnt3#10 [ cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ cnt#12 cnt2#11 cnt3#11 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG35 [19] (byte) inccnt::return#2 ← (byte) cnt#12 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ) -- vbuaa=vbuz1 + lda cnt jmp breturn //SEG36 inccnt::@return breturn: @@ -754,8 +758,9 @@ Removing instruction jmp b2 Removing instruction jmp breturn Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination -Replacing instruction ldy #0 with TAY -Replacing instruction ldx #0 with TAX +Replacing instruction lda #0 with TXA +Removing instruction lda cnt +Succesful ASM optimization Pass5UnnecesaryLoadElimination Removing instruction bbegin: Removing instruction b2_from_bbegin: Removing instruction main_from_b2: @@ -778,15 +783,15 @@ FINAL SYMBOL TABLE (byte[256]) SCREEN (const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024 (byte) cnt -(byte) cnt#11 reg byte x 4.0 -(byte) cnt#12 reg byte x 0.6666666666666666 -(byte) cnt#2 reg byte x 4.0 +(byte) cnt#11 reg byte a 4.0 +(byte) cnt#12 cnt zp ZP_BYTE:2 0.6666666666666666 +(byte) cnt#2 reg byte a 4.0 (byte) cnt2 (byte) cnt2#10 reg byte y 2.0 (byte) cnt2#11 reg byte y 0.4444444444444444 (byte) cnt3 -(byte) cnt3#10 cnt3 zp ZP_BYTE:2 1.3333333333333333 -(byte) cnt3#11 cnt3 zp ZP_BYTE:2 0.5 +(byte) cnt3#10 reg byte x 1.3333333333333333 +(byte) cnt3#11 reg byte x 0.5 (byte()) inccnt() (label) inccnt::@return (byte) inccnt::return @@ -800,19 +805,19 @@ FINAL SYMBOL TABLE (label) main::@2 (label) main::@return -reg byte x [ cnt#11 cnt#2 ] +reg byte a [ cnt#11 cnt#2 ] reg byte y [ cnt2#10 cnt2#11 ] -zp ZP_BYTE:2 [ cnt3#10 cnt3#11 ] +reg byte x [ cnt3#10 cnt3#11 ] reg byte a [ inccnt::return#0 ] reg byte a [ main::$0 ] reg byte a [ inccnt::return#1 ] reg byte a [ main::$1 ] -reg byte x [ cnt#12 ] +zp ZP_BYTE:2 [ cnt#12 ] reg byte a [ inccnt::return#2 ] FINAL ASSEMBLER -Score: 60 +Score: 62 //SEG0 Basic Upstart .pc = $801 "Basic" @@ -820,7 +825,7 @@ Score: 60 .pc = $80d "Program" //SEG1 Global Constants & labels .label SCREEN = $400 - .label cnt3 = 2 + .label cnt = 2 //SEG2 @begin //SEG3 [1] phi from @begin to @2 [phi:@begin->@2] //SEG4 @2 @@ -833,13 +838,12 @@ Score: 60 main: { //SEG10 [5] call inccnt param-assignment [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ) //SEG11 [15] phi from main to inccnt [phi:main->inccnt] - //SEG12 [15] phi (byte) cnt3#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#0] -- vbuz1=vbuc1 - lda #0 - sta cnt3 + //SEG12 [15] phi (byte) cnt3#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#0] -- vbuxx=vbuc1 + ldx #0 //SEG13 [15] phi (byte) cnt2#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#1] -- vbuyy=vbuc1 - tay - //SEG14 [15] phi (byte) cnt#11 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#2] -- vbuxx=vbuc1 - tax + ldy #0 + //SEG14 [15] phi (byte) cnt#11 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main->inccnt#2] -- vbuaa=vbuc1 + txa jsr inccnt //SEG15 [6] (byte) inccnt::return#0 ← (byte) inccnt::return#2 [ inccnt::return#0 cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ inccnt::return#0 cnt#12 cnt2#11 cnt3#11 ] ) // (byte) inccnt::return#0 = (byte) inccnt::return#2 // register copy reg byte a @@ -848,8 +852,10 @@ main: { // (byte~) main::$0 = (byte) inccnt::return#0 // register copy reg byte a //SEG18 [8] *((const byte*) SCREEN#0+(byte/signed byte/word/signed word/dword/signed dword) 0) ← (byte~) main::$0 [ cnt#12 cnt2#11 cnt3#11 ] ( main:2 [ cnt#12 cnt2#11 cnt3#11 ] ) -- _deref_pbuc1=vbuaa sta SCREEN+0 - //SEG19 [9] (byte) cnt#2 ← ++ (byte) cnt#12 [ cnt#2 cnt2#11 cnt3#11 ] ( main:2 [ cnt#2 cnt2#11 cnt3#11 ] ) -- vbuxx=_inc_vbuxx - inx + //SEG19 [9] (byte) cnt#2 ← ++ (byte) cnt#12 [ cnt#2 cnt2#11 cnt3#11 ] ( main:2 [ cnt#2 cnt2#11 cnt3#11 ] ) -- vbuaa=_inc_vbuz1 + lda cnt + clc + adc #1 //SEG20 [10] call inccnt param-assignment [ inccnt::return#2 ] ( main:2 [ inccnt::return#2 ] ) //SEG21 [15] phi from main::@1 to inccnt [phi:main::@1->inccnt] //SEG22 [15] phi (byte) cnt3#10 = (byte) cnt3#11 [phi:main::@1->inccnt#0] -- register_copy @@ -869,14 +875,15 @@ main: { } //SEG31 inccnt inccnt: { - //SEG32 [16] (byte) cnt#12 ← ++ (byte) cnt#11 [ cnt#12 cnt2#10 cnt3#10 ] ( main:2::inccnt:5 [ cnt#12 cnt2#10 cnt3#10 ] main:2::inccnt:10 [ cnt#12 cnt2#10 cnt3#10 ] ) -- vbuxx=_inc_vbuxx - inx + //SEG32 [16] (byte) cnt#12 ← ++ (byte) cnt#11 [ cnt#12 cnt2#10 cnt3#10 ] ( main:2::inccnt:5 [ cnt#12 cnt2#10 cnt3#10 ] main:2::inccnt:10 [ cnt#12 cnt2#10 cnt3#10 ] ) -- vbuz1=_inc_vbuaa + clc + adc #1 + sta cnt //SEG33 [17] (byte) cnt2#11 ← ++ (byte) cnt2#10 [ cnt#12 cnt3#10 cnt2#11 ] ( main:2::inccnt:5 [ cnt#12 cnt3#10 cnt2#11 ] main:2::inccnt:10 [ cnt#12 cnt3#10 cnt2#11 ] ) -- vbuyy=_inc_vbuyy iny - //SEG34 [18] (byte) cnt3#11 ← ++ (byte) cnt3#10 [ cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ cnt#12 cnt2#11 cnt3#11 ] ) -- vbuz1=_inc_vbuz1 - inc cnt3 - //SEG35 [19] (byte) inccnt::return#2 ← (byte) cnt#12 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ) -- vbuaa=vbuxx - txa + //SEG34 [18] (byte) cnt3#11 ← ++ (byte) cnt3#10 [ cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ cnt#12 cnt2#11 cnt3#11 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG35 [19] (byte) inccnt::return#2 ← (byte) cnt#12 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ) -- vbuaa=vbuz1 //SEG36 inccnt::@return //SEG37 [20] return [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ( main:2::inccnt:5 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] main:2::inccnt:10 [ inccnt::return#2 cnt#12 cnt2#11 cnt3#11 ] ) rts diff --git a/src/test/java/dk/camelot64/kickc/test/ref/modglobal.sym b/src/test/java/dk/camelot64/kickc/test/ref/modglobal.sym index f1394a5e4..2026a20d5 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/modglobal.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/modglobal.sym @@ -4,15 +4,15 @@ (byte[256]) SCREEN (const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024 (byte) cnt -(byte) cnt#11 reg byte x 4.0 -(byte) cnt#12 reg byte x 0.6666666666666666 -(byte) cnt#2 reg byte x 4.0 +(byte) cnt#11 reg byte a 4.0 +(byte) cnt#12 cnt zp ZP_BYTE:2 0.6666666666666666 +(byte) cnt#2 reg byte a 4.0 (byte) cnt2 (byte) cnt2#10 reg byte y 2.0 (byte) cnt2#11 reg byte y 0.4444444444444444 (byte) cnt3 -(byte) cnt3#10 cnt3 zp ZP_BYTE:2 1.3333333333333333 -(byte) cnt3#11 cnt3 zp ZP_BYTE:2 0.5 +(byte) cnt3#10 reg byte x 1.3333333333333333 +(byte) cnt3#11 reg byte x 0.5 (byte()) inccnt() (label) inccnt::@return (byte) inccnt::return @@ -26,12 +26,12 @@ (label) main::@2 (label) main::@return -reg byte x [ cnt#11 cnt#2 ] +reg byte a [ cnt#11 cnt#2 ] reg byte y [ cnt2#10 cnt2#11 ] -zp ZP_BYTE:2 [ cnt3#10 cnt3#11 ] +reg byte x [ cnt3#10 cnt3#11 ] reg byte a [ inccnt::return#0 ] reg byte a [ main::$0 ] reg byte a [ inccnt::return#1 ] reg byte a [ main::$1 ] -reg byte x [ cnt#12 ] +zp ZP_BYTE:2 [ cnt#12 ] reg byte a [ inccnt::return#2 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/norom-charset.log b/src/test/java/dk/camelot64/kickc/test/ref/norom-charset.log index ebdd61475..e0de19114 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/norom-charset.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/norom-charset.log @@ -1051,6 +1051,7 @@ Uplift Scope [main] 23.1: zp ZP_BYTE:4 [ main::c#2 main::c#1 ] 15.58: zp ZP_WORD Uplift Scope [] Uplifting [gen_char3] best 61682 combination reg byte y [ gen_char3::b#3 gen_char3::b#4 gen_char3::b#1 gen_char3::b#2 ] reg byte a [ gen_char3::$0 ] reg byte a [ gen_char3::$1 ] reg byte x [ gen_char3::c#2 gen_char3::c#1 ] zp ZP_WORD:6 [ gen_char3::spec#2 gen_char3::spec#4 gen_char3::spec#0 gen_char3::spec#1 ] zp ZP_BYTE:5 [ gen_char3::r#6 gen_char3::r#1 ] zp ZP_WORD:10 [ gen_char3::dst#0 ] +Limited combination testing to 100 combinations of 432 possible. Uplifting [main] best 61682 combination zp ZP_BYTE:4 [ main::c#2 main::c#1 ] zp ZP_WORD:2 [ main::charset#2 main::charset#1 ] Uplifting [] best 61682 combination Attempting to uplift remaining variables inzp ZP_BYTE:5 [ gen_char3::r#6 gen_char3::r#1 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/scrollbig.log b/src/test/java/dk/camelot64/kickc/test/ref/scrollbig.log index caa663b81..d102161e0 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/scrollbig.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/scrollbig.log @@ -3150,15 +3150,18 @@ Uplift Scope [next_char] 8.5: zp ZP_BYTE:13 [ next_char::return#1 next_char::c#0 Uplift Scope [main] Uplift Scope [scroll_soft] -Uplifting [scroll_bit] best 28296 combination reg byte a [ scroll_bit::bits#0 ] reg byte a [ scroll_bit::$9 ] reg byte x [ scroll_bit::r#2 scroll_bit::r#1 ] zp ZP_WORD:7 [ scroll_bit::sc#2 scroll_bit::sc#1 ] reg byte a [ scroll_bit::b#2 ] reg byte a [ scroll_bit::$3 ] zp ZP_WORD:18 [ scroll_bit::c#0 ] zp ZP_WORD:20 [ scroll_bit::$4 ] -Uplifting [scroll_hard] best 24996 combination reg byte x [ scroll_hard::i#2 scroll_hard::i#1 ] -Uplifting [] best 24684 combination zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ] zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] zp ZP_WORD:11 [ nxt#18 nxt#31 nxt#14 nxt#36 nxt#19 ] reg byte x [ scroll#18 scroll#10 scroll#3 ] -Uplifting [fillscreen] best 24684 combination zp ZP_WORD:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ] -Uplifting [next_char] best 24666 combination reg byte a [ next_char::return#1 next_char::c#0 next_char::c#1 ] reg byte a [ next_char::return#0 ] -Uplifting [main] best 24666 combination -Uplifting [scroll_soft] best 24666 combination +Uplifting [scroll_bit] best 28302 combination reg byte a [ scroll_bit::bits#0 ] reg byte a [ scroll_bit::$9 ] reg byte x [ scroll_bit::r#2 scroll_bit::r#1 ] zp ZP_WORD:7 [ scroll_bit::sc#2 scroll_bit::sc#1 ] reg byte a [ scroll_bit::b#2 ] zp ZP_BYTE:17 [ scroll_bit::$3 ] zp ZP_WORD:18 [ scroll_bit::c#0 ] zp ZP_WORD:20 [ scroll_bit::$4 ] +Limited combination testing to 100 combinations of 512 possible. +Uplifting [scroll_hard] best 25002 combination reg byte x [ scroll_hard::i#2 scroll_hard::i#1 ] +Uplifting [] best 24690 combination zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ] zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] zp ZP_WORD:11 [ nxt#18 nxt#31 nxt#14 nxt#36 nxt#19 ] reg byte x [ scroll#18 scroll#10 scroll#3 ] +Uplifting [fillscreen] best 24690 combination zp ZP_WORD:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ] +Uplifting [next_char] best 24672 combination reg byte a [ next_char::return#1 next_char::c#0 next_char::c#1 ] reg byte a [ next_char::return#0 ] +Uplifting [main] best 24672 combination +Uplifting [scroll_soft] best 24672 combination Attempting to uplift remaining variables inzp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] -Uplifting [] best 24666 combination zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] +Uplifting [] best 24672 combination zp ZP_BYTE:3 [ current_bit#29 current_bit#12 current_bit#21 current_bit#5 ] +Attempting to uplift remaining variables inzp ZP_BYTE:17 [ scroll_bit::$3 ] +Uplifting [scroll_bit] best 24666 combination reg byte a [ scroll_bit::$3 ] Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 ] ] with [ zp ZP_WORD:20 [ scroll_bit::$4 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 scroll_bit::$4 ] ] with [ zp ZP_WORD:18 [ scroll_bit::c#0 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:4 [ current_chargen#27 current_chargen#11 current_chargen#19 current_chargen#5 scroll_bit::$4 scroll_bit::c#0 ] ] with [ zp ZP_WORD:14 [ fillscreen::cursor#2 fillscreen::cursor#1 ] ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.log b/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.log index e16704cfc..65167150e 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/sinus-sprites.log @@ -8419,10 +8419,11 @@ Uplift Scope [progress_init] Uplift Scope [progress_inc] Uplifting [gen_chargen_sprite] best 1065230 combination zp ZP_BYTE:40 [ gen_chargen_sprite::s_gen#3 gen_chargen_sprite::s_gen#5 gen_chargen_sprite::s_gen#6 gen_chargen_sprite::s_gen#1 ] zp ZP_WORD:43 [ gen_chargen_sprite::sprite#3 gen_chargen_sprite::sprite#10 gen_chargen_sprite::sprite#11 gen_chargen_sprite::sprite#0 gen_chargen_sprite::sprite#2 gen_chargen_sprite::sprite#4 gen_chargen_sprite::sprite#1 ] reg byte y [ gen_chargen_sprite::s_gen_cnt#3 gen_chargen_sprite::s_gen_cnt#4 gen_chargen_sprite::s_gen_cnt#5 gen_chargen_sprite::s_gen_cnt#1 ] reg byte a [ gen_chargen_sprite::$6 ] reg byte x [ gen_chargen_sprite::b#2 gen_chargen_sprite::b#1 ] reg byte a [ gen_chargen_sprite::$3 ] zp ZP_BYTE:38 [ gen_chargen_sprite::x#6 gen_chargen_sprite::x#1 ] zp ZP_BYTE:37 [ gen_chargen_sprite::bits#2 gen_chargen_sprite::bits#0 gen_chargen_sprite::bits#1 ] zp ZP_BYTE:39 [ gen_chargen_sprite::c#3 ] zp ZP_BYTE:36 [ gen_chargen_sprite::y#2 gen_chargen_sprite::y#1 ] zp ZP_BYTE:64 [ gen_chargen_sprite::ch#0 ] zp ZP_WORD:65 [ gen_chargen_sprite::$0 ] zp ZP_WORD:67 [ gen_chargen_sprite::$1 ] zp ZP_WORD:69 [ gen_chargen_sprite::chargen#0 ] -Limited combination testing to 1000 combinations of 9216 possible. +Limited combination testing to 100 combinations of 9216 possible. Uplifting [anim] best 1063027 combination reg byte x [ anim::yidx#3 anim::yidx#0 anim::yidx#6 anim::yidx#1 anim::yidx#2 ] zp ZP_BYTE:4 [ anim::xidx#3 anim::xidx#0 anim::xidx#5 anim::xidx#1 anim::xidx#2 ] reg byte a [ anim::$3 ] reg byte a [ anim::$5 ] zp ZP_BYTE:8 [ anim::j#2 anim::j#1 ] zp ZP_BYTE:5 [ anim::x_msb#2 anim::x_msb#1 ] zp ZP_BYTE:52 [ anim::$2 ] zp ZP_BYTE:6 [ anim::j2#2 anim::j2#1 ] zp ZP_WORD:50 [ anim::x#0 ] -Limited combination testing to 1000 combinations of 19440 possible. +Limited combination testing to 100 combinations of 19440 possible. Uplifting [place_sprites] best 1062667 combination reg byte x [ place_sprites::j2#1 ] reg byte y [ place_sprites::j#2 place_sprites::j#1 ] zp ZP_BYTE:45 [ place_sprites::spr_id#2 place_sprites::spr_id#1 ] reg byte x [ place_sprites::j2#3 place_sprites::j2#2 ] zp ZP_BYTE:47 [ place_sprites::spr_x#2 place_sprites::spr_x#1 ] zp ZP_BYTE:49 [ place_sprites::col#2 place_sprites::col#1 ] +Limited combination testing to 100 combinations of 972 possible. Uplifting [setFAC] best 1062667 combination zp ZP_WORD:29 [ setFAC::w#5 setFAC::w#0 setFAC::w#3 setFAC::w#4 setFAC::w#1 ] Uplifting [gen_sintab] best 1062600 combination zp ZP_WORD:57 [ gen_sintab::$23 ] reg byte a [ gen_sintab::$24 ] zp ZP_BYTE:17 [ gen_sintab::i#10 gen_sintab::i#1 ] reg byte x [ gen_sintab::max#2 ] zp ZP_BYTE:14 [ gen_sintab::length#10 ] zp ZP_BYTE:13 [ gen_sintab::min#2 ] zp ZP_WORD:15 [ gen_sintab::sintab#12 ] Uplifting [gen_sprites] best 1062600 combination zp ZP_BYTE:33 [ gen_sprites::i#2 gen_sprites::i#1 ] zp ZP_WORD:34 [ gen_sprites::spr#2 gen_sprites::spr#1 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/sinusgen8.log b/src/test/java/dk/camelot64/kickc/test/ref/sinusgen8.log index 5bc8805ec..50464b6f9 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/sinusgen8.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/sinusgen8.log @@ -6709,21 +6709,27 @@ Uplifting [mul8u] best 18977 combination zp ZP_WORD:26 [ mul8u::res#2 mul8u::res Uplifting [print_str] best 18977 combination zp ZP_WORD:3 [ print_str::str#3 print_str::str#5 print_str::str#0 ] Uplifting [divr16u] best 18787 combination zp ZP_WORD:30 [ divr16u::rem#4 divr16u::rem#10 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:34 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:32 [ divr16u::dividend#2 divr16u::dividend#0 ] zp ZP_WORD:70 [ divr16u::return#2 ] Uplifting [] best 18787 combination zp ZP_WORD:7 [ print_char_cursor#27 print_char_cursor#37 print_char_cursor#44 print_char_cursor#41 print_char_cursor#42 print_char_cursor#19 print_char_cursor#10 print_char_cursor#1 ] -Uplifting [sin8s] best 18672 combination zp ZP_WORD:18 [ sin8s::x#6 sin8s::x#4 sin8s::x#0 sin8s::x#1 sin8s::x#2 ] reg byte a [ sin8s::return#0 ] reg byte a [ sin8s::return#1 sin8s::return#5 sin8s::sinx#1 ] reg byte x [ sin8s::usinx#4 sin8s::usinx#1 sin8s::usinx#2 ] zp ZP_WORD:46 [ sin8s::$6 ] reg byte a [ sin8s::x2#0 ] reg byte a [ sin8s::x3_6#0 ] zp ZP_BYTE:57 [ sin8s::x4#0 ] zp ZP_BYTE:59 [ sin8s::x5#0 ] zp ZP_BYTE:60 [ sin8s::x5_128#0 ] zp ZP_BYTE:52 [ sin8s::x3#0 ] zp ZP_BYTE:48 [ sin8s::x1#0 ] zp ZP_BYTE:55 [ sin8s::usinx#0 ] zp ZP_BYTE:17 [ sin8s::isUpper#10 ] -Limited combination testing to 1000 combinations of 5308416 possible. -Uplifting [mulu8_sel] best 18622 combination reg byte x [ mulu8_sel::v1#5 mulu8_sel::v1#1 mulu8_sel::v1#2 mulu8_sel::v1#3 mulu8_sel::v1#4 mulu8_sel::v1#0 ] reg byte y [ mulu8_sel::v2#5 mulu8_sel::v2#1 mulu8_sel::v2#3 mulu8_sel::v2#4 mulu8_sel::v2#0 ] reg byte a [ mulu8_sel::return#0 ] reg byte a [ mulu8_sel::return#1 ] reg byte a [ mulu8_sel::return#2 ] zp ZP_BYTE:56 [ mulu8_sel::return#10 ] zp ZP_BYTE:58 [ mulu8_sel::return#11 ] zp ZP_WORD:64 [ mulu8_sel::$0 ] zp ZP_WORD:66 [ mulu8_sel::$1 ] zp ZP_BYTE:68 [ mulu8_sel::return#12 ] zp ZP_BYTE:24 [ mulu8_sel::select#5 ] -Limited combination testing to 1000 combinations of 196608 possible. -Uplifting [sin8s_gen] best 18562 combination reg byte a [ sin8s_gen::$1 ] zp ZP_WORD:15 [ sin8s_gen::i#2 sin8s_gen::i#1 ] zp ZP_WORD:11 [ sin8s_gen::x#2 sin8s_gen::x#1 ] zp ZP_WORD:13 [ sin8s_gen::sintab#2 sin8s_gen::sintab#0 ] zp ZP_WORD:42 [ sin8s_gen::step#0 ] -Uplifting [print_cls] best 18562 combination zp ZP_WORD:9 [ print_cls::sc#2 print_cls::sc#1 ] -Uplifting [main] best 18442 combination reg byte x [ main::i#2 main::i#1 ] zp ZP_BYTE:37 [ main::sb#0 ] -Uplifting [print_char] best 18430 combination reg byte a [ print_char::ch#3 print_char::ch#1 print_char::ch#2 ] -Uplifting [print_sbyte] best 18430 combination zp ZP_BYTE:5 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] -Uplifting [print_byte] best 18422 combination reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] -Uplifting [div16u] best 18422 combination zp ZP_WORD:40 [ div16u::return#2 ] zp ZP_WORD:72 [ div16u::return#0 ] +Uplifting [sin8s] best 18682 combination zp ZP_WORD:18 [ sin8s::x#6 sin8s::x#4 sin8s::x#0 sin8s::x#1 sin8s::x#2 ] reg byte a [ sin8s::return#0 ] reg byte a [ sin8s::return#1 sin8s::return#5 sin8s::sinx#1 ] reg byte x [ sin8s::usinx#4 sin8s::usinx#1 sin8s::usinx#2 ] zp ZP_WORD:46 [ sin8s::$6 ] zp ZP_BYTE:50 [ sin8s::x2#0 ] zp ZP_BYTE:54 [ sin8s::x3_6#0 ] zp ZP_BYTE:57 [ sin8s::x4#0 ] zp ZP_BYTE:59 [ sin8s::x5#0 ] zp ZP_BYTE:60 [ sin8s::x5_128#0 ] zp ZP_BYTE:52 [ sin8s::x3#0 ] zp ZP_BYTE:48 [ sin8s::x1#0 ] zp ZP_BYTE:55 [ sin8s::usinx#0 ] zp ZP_BYTE:17 [ sin8s::isUpper#10 ] +Limited combination testing to 100 combinations of 5308416 possible. +Uplifting [mulu8_sel] best 18636 combination reg byte x [ mulu8_sel::v1#5 mulu8_sel::v1#1 mulu8_sel::v1#2 mulu8_sel::v1#3 mulu8_sel::v1#4 mulu8_sel::v1#0 ] reg byte y [ mulu8_sel::v2#5 mulu8_sel::v2#1 mulu8_sel::v2#3 mulu8_sel::v2#4 mulu8_sel::v2#0 ] reg byte a [ mulu8_sel::return#0 ] reg byte a [ mulu8_sel::return#1 ] zp ZP_BYTE:53 [ mulu8_sel::return#2 ] zp ZP_BYTE:56 [ mulu8_sel::return#10 ] zp ZP_BYTE:58 [ mulu8_sel::return#11 ] zp ZP_WORD:64 [ mulu8_sel::$0 ] zp ZP_WORD:66 [ mulu8_sel::$1 ] zp ZP_BYTE:68 [ mulu8_sel::return#12 ] zp ZP_BYTE:24 [ mulu8_sel::select#5 ] +Limited combination testing to 100 combinations of 196608 possible. +Uplifting [sin8s_gen] best 18576 combination reg byte a [ sin8s_gen::$1 ] zp ZP_WORD:15 [ sin8s_gen::i#2 sin8s_gen::i#1 ] zp ZP_WORD:11 [ sin8s_gen::x#2 sin8s_gen::x#1 ] zp ZP_WORD:13 [ sin8s_gen::sintab#2 sin8s_gen::sintab#0 ] zp ZP_WORD:42 [ sin8s_gen::step#0 ] +Uplifting [print_cls] best 18576 combination zp ZP_WORD:9 [ print_cls::sc#2 print_cls::sc#1 ] +Uplifting [main] best 18456 combination reg byte x [ main::i#2 main::i#1 ] zp ZP_BYTE:37 [ main::sb#0 ] +Uplifting [print_char] best 18444 combination reg byte a [ print_char::ch#3 print_char::ch#1 print_char::ch#2 ] +Uplifting [print_sbyte] best 18444 combination zp ZP_BYTE:5 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] +Uplifting [print_byte] best 18436 combination reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] +Uplifting [div16u] best 18436 combination zp ZP_WORD:40 [ div16u::return#2 ] zp ZP_WORD:72 [ div16u::return#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:5 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] -Uplifting [print_sbyte] best 18422 combination zp ZP_BYTE:5 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] +Uplifting [print_sbyte] best 18436 combination zp ZP_BYTE:5 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:37 [ main::sb#0 ] -Uplifting [main] best 18422 combination zp ZP_BYTE:37 [ main::sb#0 ] +Uplifting [main] best 18436 combination zp ZP_BYTE:37 [ main::sb#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:50 [ sin8s::x2#0 ] +Uplifting [sin8s] best 18432 combination reg byte a [ sin8s::x2#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:53 [ mulu8_sel::return#2 ] +Uplifting [mulu8_sel] best 18426 combination reg byte a [ mulu8_sel::return#2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:54 [ sin8s::x3_6#0 ] +Uplifting [sin8s] best 18422 combination reg byte a [ sin8s::x3_6#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:56 [ mulu8_sel::return#10 ] Uplifting [mulu8_sel] best 18416 combination reg byte a [ mulu8_sel::return#10 ] Attempting to uplift remaining variables inzp ZP_BYTE:57 [ sin8s::x4#0 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/sinusgen8b.log b/src/test/java/dk/camelot64/kickc/test/ref/sinusgen8b.log index ee44f9756..65bbd170e 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/sinusgen8b.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/sinusgen8b.log @@ -9363,24 +9363,30 @@ Uplifting [print_str] best 34981 combination zp ZP_WORD:3 [ print_str::str#3 pri Uplifting [divr16u] best 34791 combination zp ZP_WORD:43 [ divr16u::rem#6 divr16u::rem#11 divr16u::rem#5 divr16u::rem#10 divr16u::rem#7 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:47 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:45 [ divr16u::dividend#4 divr16u::dividend#6 divr16u::dividend#0 ] zp ZP_WORD:143 [ divr16u::return#3 ] zp ZP_WORD:147 [ divr16u::return#4 ] zp ZP_WORD:189 [ divr16u::return#2 ] zp ZP_WORD:41 [ divr16u::divisor#7 ] Uplifting [] best 34791 combination zp ZP_WORD:7 [ print_char_cursor#27 print_char_cursor#37 print_char_cursor#44 print_char_cursor#41 print_char_cursor#42 print_char_cursor#19 print_char_cursor#10 print_char_cursor#1 ] zp ZP_WORD:157 [ rem16u#1 ] Uplifting [main] best 34621 combination zp ZP_WORD:70 [ main::$3 ] zp ZP_WORD:72 [ main::$4 ] zp ZP_WORD:74 [ main::$5 ] zp ZP_WORD:76 [ main::sw#0 ] reg byte x [ main::i#2 main::i#1 ] reg byte a [ main::$6 ] zp ZP_BYTE:79 [ main::sd#0 ] zp ZP_BYTE:69 [ main::sb#0 ] -Uplifting [sin8s] best 34506 combination zp ZP_WORD:57 [ sin8s::x#6 sin8s::x#4 sin8s::x#0 sin8s::x#1 sin8s::x#2 ] reg byte a [ sin8s::return#0 ] reg byte a [ sin8s::return#1 sin8s::return#5 sin8s::sinx#1 ] reg byte x [ sin8s::usinx#4 sin8s::usinx#1 sin8s::usinx#2 ] zp ZP_WORD:165 [ sin8s::$6 ] reg byte a [ sin8s::x2#0 ] reg byte a [ sin8s::x3_6#0 ] zp ZP_BYTE:176 [ sin8s::x4#0 ] zp ZP_BYTE:178 [ sin8s::x5#0 ] zp ZP_BYTE:179 [ sin8s::x5_128#0 ] zp ZP_BYTE:171 [ sin8s::x3#0 ] zp ZP_BYTE:167 [ sin8s::x1#0 ] zp ZP_BYTE:174 [ sin8s::usinx#0 ] zp ZP_BYTE:56 [ sin8s::isUpper#10 ] -Limited combination testing to 1000 combinations of 5308416 possible. -Uplifting [sin16s] best 34506 combination zp ZP_DWORD:20 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:90 [ sin16s::return#0 ] zp ZP_WORD:24 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:94 [ sin16s::$6 ] zp ZP_WORD:102 [ sin16s::x2#0 ] zp ZP_WORD:110 [ sin16s::x3_6#0 ] zp ZP_WORD:116 [ sin16s::x4#0 ] zp ZP_WORD:120 [ sin16s::x5#0 ] zp ZP_WORD:122 [ sin16s::x5_128#0 ] zp ZP_WORD:106 [ sin16s::x3#0 ] zp ZP_WORD:124 [ sin16s::usinx#1 ] zp ZP_WORD:98 [ sin16s::x1#0 ] zp ZP_WORD:112 [ sin16s::usinx#0 ] zp ZP_BYTE:19 [ sin16s::isUpper#2 ] -Uplifting [mulu16_sel] best 34490 combination zp ZP_WORD:26 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:28 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:100 [ mulu16_sel::return#0 ] zp ZP_WORD:104 [ mulu16_sel::return#1 ] zp ZP_WORD:108 [ mulu16_sel::return#2 ] zp ZP_WORD:114 [ mulu16_sel::return#10 ] zp ZP_WORD:118 [ mulu16_sel::return#11 ] zp ZP_DWORD:132 [ mulu16_sel::$0 ] zp ZP_DWORD:136 [ mulu16_sel::$1 ] zp ZP_WORD:140 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] -Uplifting [mulu8_sel] best 34440 combination reg byte x [ mulu8_sel::v1#5 mulu8_sel::v1#1 mulu8_sel::v1#2 mulu8_sel::v1#3 mulu8_sel::v1#4 mulu8_sel::v1#0 ] reg byte y [ mulu8_sel::v2#5 mulu8_sel::v2#1 mulu8_sel::v2#3 mulu8_sel::v2#4 mulu8_sel::v2#0 ] reg byte a [ mulu8_sel::return#0 ] reg byte a [ mulu8_sel::return#1 ] reg byte a [ mulu8_sel::return#2 ] zp ZP_BYTE:175 [ mulu8_sel::return#10 ] zp ZP_BYTE:177 [ mulu8_sel::return#11 ] zp ZP_WORD:183 [ mulu8_sel::$0 ] zp ZP_WORD:185 [ mulu8_sel::$1 ] zp ZP_BYTE:187 [ mulu8_sel::return#12 ] zp ZP_BYTE:63 [ mulu8_sel::select#5 ] -Limited combination testing to 1000 combinations of 196608 possible. -Uplifting [sin16s_gen] best 34440 combination zp ZP_WORD:92 [ sin16s_gen::$1 ] zp ZP_WORD:17 [ sin16s_gen::i#2 sin16s_gen::i#1 ] zp ZP_DWORD:11 [ sin16s_gen::x#2 sin16s_gen::x#1 ] zp ZP_WORD:15 [ sin16s_gen::sintab#2 sin16s_gen::sintab#0 ] zp ZP_DWORD:86 [ sin16s_gen::step#0 ] -Uplifting [sin8s_gen] best 34380 combination reg byte a [ sin8s_gen::$1 ] zp ZP_WORD:54 [ sin8s_gen::i#2 sin8s_gen::i#1 ] zp ZP_WORD:50 [ sin8s_gen::x#2 sin8s_gen::x#1 ] zp ZP_WORD:52 [ sin8s_gen::sintab#2 sin8s_gen::sintab#0 ] zp ZP_WORD:161 [ sin8s_gen::step#0 ] -Uplifting [print_cls] best 34380 combination zp ZP_WORD:9 [ print_cls::sc#2 print_cls::sc#1 ] -Uplifting [print_char] best 34368 combination reg byte a [ print_char::ch#3 print_char::ch#1 print_char::ch#2 ] -Uplifting [div32u16u] best 34368 combination zp ZP_DWORD:82 [ div32u16u::return#2 ] zp ZP_WORD:149 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:151 [ div32u16u::return#0 ] zp ZP_WORD:145 [ div32u16u::quotient_hi#0 ] -Uplifting [print_sbyte] best 34368 combination zp ZP_BYTE:5 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] -Uplifting [print_byte] best 34360 combination reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] -Uplifting [div16u] best 34360 combination zp ZP_WORD:159 [ div16u::return#2 ] zp ZP_WORD:191 [ div16u::return#0 ] +Uplifting [sin8s] best 34516 combination zp ZP_WORD:57 [ sin8s::x#6 sin8s::x#4 sin8s::x#0 sin8s::x#1 sin8s::x#2 ] reg byte a [ sin8s::return#0 ] reg byte a [ sin8s::return#1 sin8s::return#5 sin8s::sinx#1 ] reg byte x [ sin8s::usinx#4 sin8s::usinx#1 sin8s::usinx#2 ] zp ZP_WORD:165 [ sin8s::$6 ] zp ZP_BYTE:169 [ sin8s::x2#0 ] zp ZP_BYTE:173 [ sin8s::x3_6#0 ] zp ZP_BYTE:176 [ sin8s::x4#0 ] zp ZP_BYTE:178 [ sin8s::x5#0 ] zp ZP_BYTE:179 [ sin8s::x5_128#0 ] zp ZP_BYTE:171 [ sin8s::x3#0 ] zp ZP_BYTE:167 [ sin8s::x1#0 ] zp ZP_BYTE:174 [ sin8s::usinx#0 ] zp ZP_BYTE:56 [ sin8s::isUpper#10 ] +Limited combination testing to 100 combinations of 5308416 possible. +Uplifting [sin16s] best 34516 combination zp ZP_DWORD:20 [ sin16s::x#6 sin16s::x#4 sin16s::x#0 sin16s::x#1 sin16s::x#2 ] zp ZP_WORD:90 [ sin16s::return#0 ] zp ZP_WORD:24 [ sin16s::return#1 sin16s::return#5 sin16s::sinx#1 ] zp ZP_DWORD:94 [ sin16s::$6 ] zp ZP_WORD:102 [ sin16s::x2#0 ] zp ZP_WORD:110 [ sin16s::x3_6#0 ] zp ZP_WORD:116 [ sin16s::x4#0 ] zp ZP_WORD:120 [ sin16s::x5#0 ] zp ZP_WORD:122 [ sin16s::x5_128#0 ] zp ZP_WORD:106 [ sin16s::x3#0 ] zp ZP_WORD:124 [ sin16s::usinx#1 ] zp ZP_WORD:98 [ sin16s::x1#0 ] zp ZP_WORD:112 [ sin16s::usinx#0 ] zp ZP_BYTE:19 [ sin16s::isUpper#2 ] +Uplifting [mulu16_sel] best 34500 combination zp ZP_WORD:26 [ mulu16_sel::v1#5 mulu16_sel::v1#3 mulu16_sel::v1#4 mulu16_sel::v1#0 mulu16_sel::v1#1 mulu16_sel::v1#2 ] zp ZP_WORD:28 [ mulu16_sel::v2#5 mulu16_sel::v2#3 mulu16_sel::v2#4 mulu16_sel::v2#0 mulu16_sel::v2#1 ] zp ZP_WORD:100 [ mulu16_sel::return#0 ] zp ZP_WORD:104 [ mulu16_sel::return#1 ] zp ZP_WORD:108 [ mulu16_sel::return#2 ] zp ZP_WORD:114 [ mulu16_sel::return#10 ] zp ZP_WORD:118 [ mulu16_sel::return#11 ] zp ZP_DWORD:132 [ mulu16_sel::$0 ] zp ZP_DWORD:136 [ mulu16_sel::$1 ] zp ZP_WORD:140 [ mulu16_sel::return#12 ] reg byte x [ mulu16_sel::select#5 ] +Uplifting [mulu8_sel] best 34454 combination reg byte x [ mulu8_sel::v1#5 mulu8_sel::v1#1 mulu8_sel::v1#2 mulu8_sel::v1#3 mulu8_sel::v1#4 mulu8_sel::v1#0 ] reg byte y [ mulu8_sel::v2#5 mulu8_sel::v2#1 mulu8_sel::v2#3 mulu8_sel::v2#4 mulu8_sel::v2#0 ] reg byte a [ mulu8_sel::return#0 ] reg byte a [ mulu8_sel::return#1 ] zp ZP_BYTE:172 [ mulu8_sel::return#2 ] zp ZP_BYTE:175 [ mulu8_sel::return#10 ] zp ZP_BYTE:177 [ mulu8_sel::return#11 ] zp ZP_WORD:183 [ mulu8_sel::$0 ] zp ZP_WORD:185 [ mulu8_sel::$1 ] zp ZP_BYTE:187 [ mulu8_sel::return#12 ] zp ZP_BYTE:63 [ mulu8_sel::select#5 ] +Limited combination testing to 100 combinations of 196608 possible. +Uplifting [sin16s_gen] best 34454 combination zp ZP_WORD:92 [ sin16s_gen::$1 ] zp ZP_WORD:17 [ sin16s_gen::i#2 sin16s_gen::i#1 ] zp ZP_DWORD:11 [ sin16s_gen::x#2 sin16s_gen::x#1 ] zp ZP_WORD:15 [ sin16s_gen::sintab#2 sin16s_gen::sintab#0 ] zp ZP_DWORD:86 [ sin16s_gen::step#0 ] +Uplifting [sin8s_gen] best 34394 combination reg byte a [ sin8s_gen::$1 ] zp ZP_WORD:54 [ sin8s_gen::i#2 sin8s_gen::i#1 ] zp ZP_WORD:50 [ sin8s_gen::x#2 sin8s_gen::x#1 ] zp ZP_WORD:52 [ sin8s_gen::sintab#2 sin8s_gen::sintab#0 ] zp ZP_WORD:161 [ sin8s_gen::step#0 ] +Uplifting [print_cls] best 34394 combination zp ZP_WORD:9 [ print_cls::sc#2 print_cls::sc#1 ] +Uplifting [print_char] best 34382 combination reg byte a [ print_char::ch#3 print_char::ch#1 print_char::ch#2 ] +Uplifting [div32u16u] best 34382 combination zp ZP_DWORD:82 [ div32u16u::return#2 ] zp ZP_WORD:149 [ div32u16u::quotient_lo#0 ] zp ZP_DWORD:151 [ div32u16u::return#0 ] zp ZP_WORD:145 [ div32u16u::quotient_hi#0 ] +Uplifting [print_sbyte] best 34382 combination zp ZP_BYTE:5 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] +Uplifting [print_byte] best 34374 combination reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] +Uplifting [div16u] best 34374 combination zp ZP_WORD:159 [ div16u::return#2 ] zp ZP_WORD:191 [ div16u::return#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:5 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] -Uplifting [print_sbyte] best 34360 combination zp ZP_BYTE:5 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] +Uplifting [print_sbyte] best 34374 combination zp ZP_BYTE:5 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:79 [ main::sd#0 ] -Uplifting [main] best 34360 combination zp ZP_BYTE:79 [ main::sd#0 ] +Uplifting [main] best 34374 combination zp ZP_BYTE:79 [ main::sd#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:169 [ sin8s::x2#0 ] +Uplifting [sin8s] best 34370 combination reg byte a [ sin8s::x2#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:172 [ mulu8_sel::return#2 ] +Uplifting [mulu8_sel] best 34364 combination reg byte a [ mulu8_sel::return#2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:173 [ sin8s::x3_6#0 ] +Uplifting [sin8s] best 34360 combination reg byte a [ sin8s::x3_6#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:175 [ mulu8_sel::return#10 ] Uplifting [mulu8_sel] best 34354 combination reg byte a [ mulu8_sel::return#10 ] Attempting to uplift remaining variables inzp ZP_BYTE:176 [ sin8s::x4#0 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/sinusgenscale8.log b/src/test/java/dk/camelot64/kickc/test/ref/sinusgenscale8.log index 1f0a441d7..5c2d7e41a 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/sinusgenscale8.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/sinusgenscale8.log @@ -8852,25 +8852,31 @@ Uplifting [mul8u] best 24241 combination zp ZP_WORD:25 [ mul8u::res#2 mul8u::res Uplifting [] best 24241 combination zp ZP_WORD:8 [ print_line_cursor#12 print_line_cursor#23 print_line_cursor#1 ] zp ZP_WORD:16 [ print_char_cursor#92 print_char_cursor#102 print_char_cursor#62 print_char_cursor#97 print_char_cursor#94 print_char_cursor#96 print_char_cursor#17 print_char_cursor#2 print_char_cursor#121 print_char_cursor#1 ] Uplifting [print_str] best 24241 combination zp ZP_WORD:12 [ print_str::str#10 print_str::str#12 print_str::str#0 ] Uplifting [divr16u] best 24051 combination zp ZP_WORD:37 [ divr16u::rem#4 divr16u::rem#10 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:41 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:39 [ divr16u::dividend#2 divr16u::dividend#0 ] zp ZP_WORD:88 [ divr16u::return#2 ] -Uplifting [sin8s] best 23936 combination zp ZP_WORD:30 [ sin8s::x#6 sin8s::x#4 sin8s::x#2 sin8s::x#0 sin8s::x#1 ] reg byte a [ sin8s::return#2 ] reg byte a [ sin8s::return#0 sin8s::return#5 sin8s::sinx#1 ] reg byte x [ sin8s::usinx#4 sin8s::usinx#1 sin8s::usinx#2 ] zp ZP_WORD:66 [ sin8s::$6 ] reg byte a [ sin8s::x2#0 ] reg byte a [ sin8s::x3_6#0 ] zp ZP_BYTE:77 [ sin8s::x4#0 ] zp ZP_BYTE:79 [ sin8s::x5#0 ] zp ZP_BYTE:80 [ sin8s::x5_128#0 ] zp ZP_BYTE:72 [ sin8s::x3#0 ] zp ZP_BYTE:68 [ sin8s::x1#0 ] zp ZP_BYTE:75 [ sin8s::usinx#0 ] zp ZP_BYTE:29 [ sin8s::isUpper#10 ] -Limited combination testing to 1000 combinations of 5308416 possible. -Uplifting [mulu8_sel] best 23886 combination reg byte x [ mulu8_sel::v1#5 mulu8_sel::v1#1 mulu8_sel::v1#2 mulu8_sel::v1#3 mulu8_sel::v1#4 mulu8_sel::v1#0 ] reg byte y [ mulu8_sel::v2#5 mulu8_sel::v2#1 mulu8_sel::v2#3 mulu8_sel::v2#4 mulu8_sel::v2#0 ] reg byte a [ mulu8_sel::return#0 ] reg byte a [ mulu8_sel::return#1 ] reg byte a [ mulu8_sel::return#2 ] zp ZP_BYTE:76 [ mulu8_sel::return#10 ] zp ZP_BYTE:78 [ mulu8_sel::return#11 ] zp ZP_WORD:83 [ mulu8_sel::$0 ] zp ZP_WORD:85 [ mulu8_sel::$1 ] zp ZP_BYTE:87 [ mulu8_sel::return#12 ] zp ZP_BYTE:36 [ mulu8_sel::select#5 ] -Limited combination testing to 1000 combinations of 196608 possible. -Uplifting [sin8u_table] best 23776 combination reg byte a [ sin8u_table::$21 ] zp ZP_WORD:6 [ sin8u_table::i#10 sin8u_table::i#1 ] zp ZP_WORD:2 [ sin8u_table::x#10 sin8u_table::x#1 ] zp ZP_WORD:4 [ sin8u_table::sintab#2 sin8u_table::sintab#1 ] zp ZP_BYTE:51 [ sin8u_table::sinx#0 ] zp ZP_WORD:55 [ sin8u_table::sinx_sc#0 ] reg byte x [ sin8u_table::sinx_tr#0 ] zp ZP_WORD:48 [ sin8u_table::step#0 ] -Uplifting [print_byte] best 23768 combination zp ZP_BYTE:10 [ print_byte::b#8 print_byte::b#10 print_byte::b#1 print_byte::b#2 print_byte::b#7 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] -Uplifting [mul8su] best 23724 combination zp ZP_WORD:53 [ mul8su::return#2 ] zp ZP_WORD:21 [ mul8su::m#2 mul8su::m#1 mul8su::m#0 ] reg byte a [ mul8su::$6 ] reg byte a [ mul8su::$10 ] reg byte y [ mul8su::a#0 ] -Uplifting [print_word] best 23724 combination zp ZP_WORD:18 [ print_word::w#3 print_word::w#5 print_word::w#2 print_word::w#1 ] -Uplifting [print_cls] best 23724 combination zp ZP_WORD:44 [ print_cls::sc#2 print_cls::sc#1 ] -Uplifting [print_char] best 23709 combination reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] -Uplifting [print_sword] best 23709 combination zp ZP_WORD:14 [ print_sword::w#3 print_sword::w#1 print_sword::w#0 ] -Uplifting [print_sbyte] best 23709 combination zp ZP_BYTE:20 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] -Uplifting [div16u] best 23709 combination zp ZP_WORD:46 [ div16u::return#2 ] zp ZP_WORD:90 [ div16u::return#0 ] -Uplifting [print_ln] best 23709 combination -Uplifting [main] best 23709 combination +Uplifting [sin8s] best 23946 combination zp ZP_WORD:30 [ sin8s::x#6 sin8s::x#4 sin8s::x#2 sin8s::x#0 sin8s::x#1 ] reg byte a [ sin8s::return#2 ] reg byte a [ sin8s::return#0 sin8s::return#5 sin8s::sinx#1 ] reg byte x [ sin8s::usinx#4 sin8s::usinx#1 sin8s::usinx#2 ] zp ZP_WORD:66 [ sin8s::$6 ] zp ZP_BYTE:70 [ sin8s::x2#0 ] zp ZP_BYTE:74 [ sin8s::x3_6#0 ] zp ZP_BYTE:77 [ sin8s::x4#0 ] zp ZP_BYTE:79 [ sin8s::x5#0 ] zp ZP_BYTE:80 [ sin8s::x5_128#0 ] zp ZP_BYTE:72 [ sin8s::x3#0 ] zp ZP_BYTE:68 [ sin8s::x1#0 ] zp ZP_BYTE:75 [ sin8s::usinx#0 ] zp ZP_BYTE:29 [ sin8s::isUpper#10 ] +Limited combination testing to 100 combinations of 5308416 possible. +Uplifting [mulu8_sel] best 23900 combination reg byte x [ mulu8_sel::v1#5 mulu8_sel::v1#1 mulu8_sel::v1#2 mulu8_sel::v1#3 mulu8_sel::v1#4 mulu8_sel::v1#0 ] reg byte y [ mulu8_sel::v2#5 mulu8_sel::v2#1 mulu8_sel::v2#3 mulu8_sel::v2#4 mulu8_sel::v2#0 ] reg byte a [ mulu8_sel::return#0 ] reg byte a [ mulu8_sel::return#1 ] zp ZP_BYTE:73 [ mulu8_sel::return#2 ] zp ZP_BYTE:76 [ mulu8_sel::return#10 ] zp ZP_BYTE:78 [ mulu8_sel::return#11 ] zp ZP_WORD:83 [ mulu8_sel::$0 ] zp ZP_WORD:85 [ mulu8_sel::$1 ] zp ZP_BYTE:87 [ mulu8_sel::return#12 ] zp ZP_BYTE:36 [ mulu8_sel::select#5 ] +Limited combination testing to 100 combinations of 196608 possible. +Uplifting [sin8u_table] best 23790 combination reg byte a [ sin8u_table::$21 ] zp ZP_WORD:6 [ sin8u_table::i#10 sin8u_table::i#1 ] zp ZP_WORD:2 [ sin8u_table::x#10 sin8u_table::x#1 ] zp ZP_WORD:4 [ sin8u_table::sintab#2 sin8u_table::sintab#1 ] zp ZP_BYTE:51 [ sin8u_table::sinx#0 ] zp ZP_WORD:55 [ sin8u_table::sinx_sc#0 ] reg byte x [ sin8u_table::sinx_tr#0 ] zp ZP_WORD:48 [ sin8u_table::step#0 ] +Uplifting [print_byte] best 23782 combination zp ZP_BYTE:10 [ print_byte::b#8 print_byte::b#10 print_byte::b#1 print_byte::b#2 print_byte::b#7 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] +Uplifting [mul8su] best 23738 combination zp ZP_WORD:53 [ mul8su::return#2 ] zp ZP_WORD:21 [ mul8su::m#2 mul8su::m#1 mul8su::m#0 ] reg byte a [ mul8su::$6 ] reg byte a [ mul8su::$10 ] reg byte y [ mul8su::a#0 ] +Uplifting [print_word] best 23738 combination zp ZP_WORD:18 [ print_word::w#3 print_word::w#5 print_word::w#2 print_word::w#1 ] +Uplifting [print_cls] best 23738 combination zp ZP_WORD:44 [ print_cls::sc#2 print_cls::sc#1 ] +Uplifting [print_char] best 23723 combination reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] +Uplifting [print_sword] best 23723 combination zp ZP_WORD:14 [ print_sword::w#3 print_sword::w#1 print_sword::w#0 ] +Uplifting [print_sbyte] best 23723 combination zp ZP_BYTE:20 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] +Uplifting [div16u] best 23723 combination zp ZP_WORD:46 [ div16u::return#2 ] zp ZP_WORD:90 [ div16u::return#0 ] +Uplifting [print_ln] best 23723 combination +Uplifting [main] best 23723 combination Attempting to uplift remaining variables inzp ZP_BYTE:10 [ print_byte::b#8 print_byte::b#10 print_byte::b#1 print_byte::b#2 print_byte::b#7 ] -Uplifting [print_byte] best 23709 combination zp ZP_BYTE:10 [ print_byte::b#8 print_byte::b#10 print_byte::b#1 print_byte::b#2 print_byte::b#7 ] +Uplifting [print_byte] best 23723 combination zp ZP_BYTE:10 [ print_byte::b#8 print_byte::b#10 print_byte::b#1 print_byte::b#2 print_byte::b#7 ] Attempting to uplift remaining variables inzp ZP_BYTE:20 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] -Uplifting [print_sbyte] best 23709 combination zp ZP_BYTE:20 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] +Uplifting [print_sbyte] best 23723 combination zp ZP_BYTE:20 [ print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:70 [ sin8s::x2#0 ] +Uplifting [sin8s] best 23719 combination reg byte a [ sin8s::x2#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:73 [ mulu8_sel::return#2 ] +Uplifting [mulu8_sel] best 23713 combination reg byte a [ mulu8_sel::return#2 ] +Attempting to uplift remaining variables inzp ZP_BYTE:74 [ sin8s::x3_6#0 ] +Uplifting [sin8s] best 23709 combination reg byte a [ sin8s::x3_6#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:76 [ mulu8_sel::return#10 ] Uplifting [mulu8_sel] best 23703 combination reg byte a [ mulu8_sel::return#10 ] Attempting to uplift remaining variables inzp ZP_BYTE:77 [ sin8s::x4#0 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/summin.log b/src/test/java/dk/camelot64/kickc/test/ref/summin.log index 693fee6a1..7263fb7ef 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/summin.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/summin.log @@ -604,15 +604,21 @@ Uplift Scope [sum] 4: zp ZP_BYTE:4 [ sum::return#0 ] 4: zp ZP_BYTE:6 [ sum::retu Uplift Scope [main] 4: zp ZP_BYTE:10 [ main::$3 ] 4: zp ZP_BYTE:11 [ main::s4#0 ] 2: zp ZP_BYTE:9 [ main::s3#0 ] 1: zp ZP_BYTE:7 [ main::s2#0 ] 0.57: zp ZP_BYTE:5 [ main::s1#0 ] Uplift Scope [] -Uplifting [sum] best 127 combination reg byte a [ sum::return#0 ] reg byte a [ sum::return#1 ] reg byte a [ sum::return#2 ] reg byte x [ sum::a#3 ] reg byte a [ sum::b#3 ] zp ZP_BYTE:12 [ sum::return#3 ] -Limited combination testing to 1000 combinations of 4096 possible. -Uplifting [main] best 113 combination reg byte a [ main::$3 ] reg byte a [ main::s4#0 ] zp ZP_BYTE:9 [ main::s3#0 ] reg byte y [ main::s2#0 ] zp ZP_BYTE:5 [ main::s1#0 ] -Limited combination testing to 1000 combinations of 1024 possible. -Uplifting [] best 113 combination +Uplifting [sum] best 145 combination reg byte a [ sum::return#0 ] reg byte a [ sum::return#1 ] reg byte a [ sum::return#2 ] zp ZP_BYTE:2 [ sum::a#3 ] zp ZP_BYTE:3 [ sum::b#3 ] zp ZP_BYTE:12 [ sum::return#3 ] +Limited combination testing to 100 combinations of 4096 possible. +Uplifting [main] best 133 combination reg byte a [ main::$3 ] reg byte a [ main::s4#0 ] zp ZP_BYTE:9 [ main::s3#0 ] zp ZP_BYTE:7 [ main::s2#0 ] zp ZP_BYTE:5 [ main::s1#0 ] +Limited combination testing to 100 combinations of 1024 possible. +Uplifting [] best 133 combination +Attempting to uplift remaining variables inzp ZP_BYTE:2 [ sum::a#3 ] +Uplifting [sum] best 123 combination reg byte x [ sum::a#3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:3 [ sum::b#3 ] +Uplifting [sum] best 115 combination reg byte a [ sum::b#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:9 [ main::s3#0 ] -Uplifting [main] best 113 combination zp ZP_BYTE:9 [ main::s3#0 ] +Uplifting [main] best 115 combination zp ZP_BYTE:9 [ main::s3#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:12 [ sum::return#3 ] -Uplifting [sum] best 101 combination reg byte a [ sum::return#3 ] +Uplifting [sum] best 103 combination reg byte a [ sum::return#3 ] +Attempting to uplift remaining variables inzp ZP_BYTE:7 [ main::s2#0 ] +Uplifting [main] best 101 combination reg byte y [ main::s2#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:5 [ main::s1#0 ] Uplifting [main] best 101 combination zp ZP_BYTE:5 [ main::s1#0 ] Allocated (was zp ZP_BYTE:5) zp ZP_BYTE:2 [ main::s1#0 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/test-division.log b/src/test/java/dk/camelot64/kickc/test/ref/test-division.log index 9eb70d2d4..9c4d0bcee 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/test-division.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/test-division.log @@ -9355,53 +9355,59 @@ Uplift Scope [main] Uplifting [divr16u] best 44804 combination zp ZP_WORD:28 [ divr16u::rem#4 divr16u::rem#10 divr16u::rem#5 divr16u::rem#0 divr16u::rem#1 divr16u::rem#2 ] zp ZP_WORD:32 [ divr16u::quotient#3 divr16u::return#0 divr16u::quotient#1 divr16u::quotient#2 ] reg byte a [ divr16u::$1 ] reg byte a [ divr16u::$2 ] reg byte x [ divr16u::i#2 divr16u::i#1 ] zp ZP_WORD:30 [ divr16u::dividend#2 divr16u::dividend#1 divr16u::dividend#0 ] zp ZP_WORD:74 [ divr16u::divisor#0 ] zp ZP_WORD:76 [ divr16u::return#2 ] Uplifting [divr8u] best 42601 combination reg byte y [ divr8u::rem#4 divr8u::rem#10 divr8u::rem#5 divr8u::rem#1 divr8u::rem#2 divr8u::rem#3 ] zp ZP_BYTE:46 [ divr8u::quotient#3 divr8u::return#1 divr8u::quotient#1 divr8u::quotient#2 ] reg byte a [ divr8u::$1 ] reg byte x [ divr8u::i#2 divr8u::i#1 ] zp ZP_BYTE:45 [ divr8u::dividend#2 divr8u::dividend#0 divr8u::dividend#1 ] zp ZP_BYTE:94 [ divr8u::divisor#0 ] zp ZP_BYTE:95 [ divr8u::return#0 ] -Limited combination testing to 1000 combinations of 3888 possible. +Limited combination testing to 100 combinations of 3888 possible. Uplifting [] best 42534 combination zp ZP_WORD:11 [ print_char_cursor#80 print_char_cursor#133 print_char_cursor#130 print_char_cursor#132 print_char_cursor#128 print_char_cursor#129 print_char_cursor#155 print_char_cursor#126 print_char_cursor#17 print_char_cursor#162 print_char_cursor#135 print_char_cursor#131 print_char_cursor#1 print_char_cursor#179 print_char_cursor#185 ] zp ZP_WORD:3 [ print_line_cursor#20 print_line_cursor#39 print_line_cursor#1 print_line_cursor#41 ] zp ZP_WORD:22 [ rem16s#3 rem16s#31 rem16s#1 ] reg byte x [ rem8s#3 rem8s#32 rem8s#1 ] reg byte x [ rem8u#17 ] zp ZP_WORD:82 [ rem16u#1 ] Uplifting [print_str] best 42534 combination zp ZP_WORD:13 [ print_str::str#13 print_str::str#15 print_str::str#0 ] Uplifting [print_byte] best 42526 combination zp ZP_BYTE:9 [ print_byte::b#7 print_byte::b#9 print_byte::b#1 print_byte::b#2 print_byte::b#3 print_byte::b#4 print_byte::b#5 print_byte::b#6 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] Uplifting [print_word] best 42526 combination zp ZP_WORD:7 [ print_word::w#5 print_word::w#7 print_word::w#1 print_word::w#2 print_word::w#3 print_word::w#4 ] Uplifting [print_sword] best 42526 combination zp ZP_WORD:5 [ print_sword::w#6 print_sword::w#5 print_sword::w#1 print_sword::w#2 print_sword::w#3 print_sword::w#4 print_sword::w#0 ] Uplifting [print_sbyte] best 42526 combination zp ZP_BYTE:36 [ print_sbyte::b#6 print_sbyte::b#5 print_sbyte::b#1 print_sbyte::b#2 print_sbyte::b#3 print_sbyte::b#4 print_sbyte::b#0 ] -Uplifting [div8u] best 42352 combination reg byte x [ div8u::divisor#2 div8u::divisor#0 div8u::divisor#1 ] reg byte a [ div8u::dividend#2 div8u::dividend#0 div8u::dividend#1 ] reg byte a [ div8u::return#3 ] reg byte a [ div8u::return#2 ] reg byte a [ div8u::return#0 ] -Limited combination testing to 1000 combinations of 1024 possible. -Uplifting [div16u] best 42352 combination zp ZP_WORD:26 [ div16u::divisor#2 div16u::divisor#0 div16u::divisor#1 ] zp ZP_WORD:24 [ div16u::dividend#2 div16u::dividend#0 div16u::dividend#1 ] zp ZP_WORD:103 [ div16u::return#3 ] zp ZP_WORD:70 [ div16u::return#2 ] zp ZP_WORD:78 [ div16u::return#0 ] -Uplifting [div8s] best 42203 combination reg byte a [ div8s::return#3 ] reg byte x [ div8s::divisoru#3 div8s::divisoru#4 div8s::divisoru#5 ] reg byte a [ div8s::return#2 div8s::return#6 div8s::return#0 ] reg byte y [ div8s::dividendu#3 div8s::dividendu#7 div8s::dividendu#8 ] reg byte y [ div8s::dividend#0 ] zp ZP_BYTE:39 [ div8s::neg#4 div8s::neg#3 div8s::neg#2 ] zp ZP_BYTE:87 [ div8s::divisor#0 ] zp ZP_BYTE:90 [ div8s::$2 ] zp ZP_BYTE:91 [ div8s::$7 ] zp ZP_BYTE:93 [ div8s::resultu#0 ] -Limited combination testing to 1000 combinations of 248832 possible. -Uplifting [div16s] best 42194 combination zp ZP_WORD:60 [ div16s::return#3 ] zp ZP_WORD:17 [ div16s::divisoru#3 div16s::divisoru#4 div16s::divisoru#5 ] zp ZP_WORD:20 [ div16s::return#2 div16s::return#6 div16s::return#0 ] zp ZP_WORD:15 [ div16s::dividendu#3 div16s::dividendu#7 div16s::dividendu#8 ] zp ZP_WORD:56 [ div16s::dividend#0 ] reg byte y [ div16s::neg#4 div16s::neg#3 div16s::neg#2 ] zp ZP_WORD:58 [ div16s::divisor#0 ] zp ZP_WORD:66 [ div16s::$2 ] zp ZP_WORD:68 [ div16s::$7 ] zp ZP_WORD:72 [ div16s::resultu#0 ] -Uplifting [print_cls] best 42194 combination zp ZP_WORD:50 [ print_cls::sc#2 print_cls::sc#1 ] -Uplifting [test_16u] best 42194 combination zp ZP_BYTE:48 [ test_16u::i#10 test_16u::i#1 ] zp ZP_WORD:99 [ test_16u::dividend#0 ] zp ZP_WORD:101 [ test_16u::divisor#0 ] zp ZP_WORD:105 [ test_16u::res#0 ] -Uplifting [test_8s] best 42194 combination zp ZP_BYTE:35 [ test_8s::i#10 test_8s::i#1 ] zp ZP_BYTE:84 [ test_8s::dividend#0 ] zp ZP_BYTE:85 [ test_8s::divisor#0 ] zp ZP_BYTE:89 [ test_8s::res#0 ] -Uplifting [test_16s] best 42194 combination zp ZP_BYTE:2 [ test_16s::i#10 test_16s::i#1 ] zp ZP_WORD:52 [ test_16s::dividend#0 ] zp ZP_WORD:54 [ test_16s::divisor#0 ] zp ZP_WORD:62 [ test_16s::res#0 ] -Uplifting [test_8u] best 42194 combination zp ZP_BYTE:49 [ test_8u::i#10 test_8u::i#1 ] zp ZP_BYTE:107 [ test_8u::dividend#0 ] zp ZP_BYTE:108 [ test_8u::divisor#0 ] zp ZP_BYTE:110 [ test_8u::res#0 ] -Uplifting [print_char] best 42179 combination reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] -Uplifting [print_ln] best 42179 combination -Uplifting [main] best 42179 combination +Uplifting [div8u] best 42388 combination reg byte x [ div8u::divisor#2 div8u::divisor#0 div8u::divisor#1 ] reg byte a [ div8u::dividend#2 div8u::dividend#0 div8u::dividend#1 ] reg byte a [ div8u::return#3 ] reg byte a [ div8u::return#2 ] zp ZP_BYTE:96 [ div8u::return#0 ] +Limited combination testing to 100 combinations of 1024 possible. +Uplifting [div16u] best 42388 combination zp ZP_WORD:26 [ div16u::divisor#2 div16u::divisor#0 div16u::divisor#1 ] zp ZP_WORD:24 [ div16u::dividend#2 div16u::dividend#0 div16u::dividend#1 ] zp ZP_WORD:103 [ div16u::return#3 ] zp ZP_WORD:70 [ div16u::return#2 ] zp ZP_WORD:78 [ div16u::return#0 ] +Uplifting [div8s] best 42283 combination reg byte a [ div8s::return#3 ] reg byte x [ div8s::divisoru#3 div8s::divisoru#4 div8s::divisoru#5 ] reg byte a [ div8s::return#2 div8s::return#6 div8s::return#0 ] zp ZP_BYTE:37 [ div8s::dividendu#3 div8s::dividendu#7 div8s::dividendu#8 ] zp ZP_BYTE:86 [ div8s::dividend#0 ] zp ZP_BYTE:39 [ div8s::neg#4 div8s::neg#3 div8s::neg#2 ] zp ZP_BYTE:87 [ div8s::divisor#0 ] zp ZP_BYTE:90 [ div8s::$2 ] zp ZP_BYTE:91 [ div8s::$7 ] zp ZP_BYTE:93 [ div8s::resultu#0 ] +Limited combination testing to 100 combinations of 248832 possible. +Uplifting [div16s] best 42274 combination zp ZP_WORD:60 [ div16s::return#3 ] zp ZP_WORD:17 [ div16s::divisoru#3 div16s::divisoru#4 div16s::divisoru#5 ] zp ZP_WORD:20 [ div16s::return#2 div16s::return#6 div16s::return#0 ] zp ZP_WORD:15 [ div16s::dividendu#3 div16s::dividendu#7 div16s::dividendu#8 ] zp ZP_WORD:56 [ div16s::dividend#0 ] reg byte y [ div16s::neg#4 div16s::neg#3 div16s::neg#2 ] zp ZP_WORD:58 [ div16s::divisor#0 ] zp ZP_WORD:66 [ div16s::$2 ] zp ZP_WORD:68 [ div16s::$7 ] zp ZP_WORD:72 [ div16s::resultu#0 ] +Uplifting [print_cls] best 42274 combination zp ZP_WORD:50 [ print_cls::sc#2 print_cls::sc#1 ] +Uplifting [test_16u] best 42274 combination zp ZP_BYTE:48 [ test_16u::i#10 test_16u::i#1 ] zp ZP_WORD:99 [ test_16u::dividend#0 ] zp ZP_WORD:101 [ test_16u::divisor#0 ] zp ZP_WORD:105 [ test_16u::res#0 ] +Uplifting [test_8s] best 42274 combination zp ZP_BYTE:35 [ test_8s::i#10 test_8s::i#1 ] zp ZP_BYTE:84 [ test_8s::dividend#0 ] zp ZP_BYTE:85 [ test_8s::divisor#0 ] zp ZP_BYTE:89 [ test_8s::res#0 ] +Uplifting [test_16s] best 42274 combination zp ZP_BYTE:2 [ test_16s::i#10 test_16s::i#1 ] zp ZP_WORD:52 [ test_16s::dividend#0 ] zp ZP_WORD:54 [ test_16s::divisor#0 ] zp ZP_WORD:62 [ test_16s::res#0 ] +Uplifting [test_8u] best 42274 combination zp ZP_BYTE:49 [ test_8u::i#10 test_8u::i#1 ] zp ZP_BYTE:107 [ test_8u::dividend#0 ] zp ZP_BYTE:108 [ test_8u::divisor#0 ] zp ZP_BYTE:110 [ test_8u::res#0 ] +Uplifting [print_char] best 42259 combination reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] +Uplifting [print_ln] best 42259 combination +Uplifting [main] best 42259 combination Attempting to uplift remaining variables inzp ZP_BYTE:46 [ divr8u::quotient#3 divr8u::return#1 divr8u::quotient#1 divr8u::quotient#2 ] -Uplifting [divr8u] best 42179 combination zp ZP_BYTE:46 [ divr8u::quotient#3 divr8u::return#1 divr8u::quotient#1 divr8u::quotient#2 ] +Uplifting [divr8u] best 42259 combination zp ZP_BYTE:46 [ divr8u::quotient#3 divr8u::return#1 divr8u::quotient#1 divr8u::quotient#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:9 [ print_byte::b#7 print_byte::b#9 print_byte::b#1 print_byte::b#2 print_byte::b#3 print_byte::b#4 print_byte::b#5 print_byte::b#6 ] -Uplifting [print_byte] best 42179 combination zp ZP_BYTE:9 [ print_byte::b#7 print_byte::b#9 print_byte::b#1 print_byte::b#2 print_byte::b#3 print_byte::b#4 print_byte::b#5 print_byte::b#6 ] +Uplifting [print_byte] best 42259 combination zp ZP_BYTE:9 [ print_byte::b#7 print_byte::b#9 print_byte::b#1 print_byte::b#2 print_byte::b#3 print_byte::b#4 print_byte::b#5 print_byte::b#6 ] Attempting to uplift remaining variables inzp ZP_BYTE:36 [ print_sbyte::b#6 print_sbyte::b#5 print_sbyte::b#1 print_sbyte::b#2 print_sbyte::b#3 print_sbyte::b#4 print_sbyte::b#0 ] -Uplifting [print_sbyte] best 42179 combination zp ZP_BYTE:36 [ print_sbyte::b#6 print_sbyte::b#5 print_sbyte::b#1 print_sbyte::b#2 print_sbyte::b#3 print_sbyte::b#4 print_sbyte::b#0 ] +Uplifting [print_sbyte] best 42259 combination zp ZP_BYTE:36 [ print_sbyte::b#6 print_sbyte::b#5 print_sbyte::b#1 print_sbyte::b#2 print_sbyte::b#3 print_sbyte::b#4 print_sbyte::b#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:45 [ divr8u::dividend#2 divr8u::dividend#0 divr8u::dividend#1 ] -Uplifting [divr8u] best 42179 combination zp ZP_BYTE:45 [ divr8u::dividend#2 divr8u::dividend#0 divr8u::dividend#1 ] +Uplifting [divr8u] best 42259 combination zp ZP_BYTE:45 [ divr8u::dividend#2 divr8u::dividend#0 divr8u::dividend#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:2 [ test_16s::i#10 test_16s::i#1 ] -Uplifting [test_16s] best 42179 combination zp ZP_BYTE:2 [ test_16s::i#10 test_16s::i#1 ] +Uplifting [test_16s] best 42259 combination zp ZP_BYTE:2 [ test_16s::i#10 test_16s::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:35 [ test_8s::i#10 test_8s::i#1 ] -Uplifting [test_8s] best 42179 combination zp ZP_BYTE:35 [ test_8s::i#10 test_8s::i#1 ] +Uplifting [test_8s] best 42259 combination zp ZP_BYTE:35 [ test_8s::i#10 test_8s::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:48 [ test_16u::i#10 test_16u::i#1 ] -Uplifting [test_16u] best 42179 combination zp ZP_BYTE:48 [ test_16u::i#10 test_16u::i#1 ] +Uplifting [test_16u] best 42259 combination zp ZP_BYTE:48 [ test_16u::i#10 test_16u::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:49 [ test_8u::i#10 test_8u::i#1 ] -Uplifting [test_8u] best 42179 combination zp ZP_BYTE:49 [ test_8u::i#10 test_8u::i#1 ] +Uplifting [test_8u] best 42259 combination zp ZP_BYTE:49 [ test_8u::i#10 test_8u::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:94 [ divr8u::divisor#0 ] -Uplifting [divr8u] best 42179 combination zp ZP_BYTE:94 [ divr8u::divisor#0 ] +Uplifting [divr8u] best 42259 combination zp ZP_BYTE:94 [ divr8u::divisor#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:37 [ div8s::dividendu#3 div8s::dividendu#7 div8s::dividendu#8 ] +Uplifting [div8s] best 42252 combination reg byte y [ div8s::dividendu#3 div8s::dividendu#7 div8s::dividendu#8 ] +Attempting to uplift remaining variables inzp ZP_BYTE:86 [ div8s::dividend#0 ] +Uplifting [div8s] best 42215 combination reg byte y [ div8s::dividend#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:84 [ test_8s::dividend#0 ] -Uplifting [test_8s] best 42179 combination zp ZP_BYTE:84 [ test_8s::dividend#0 ] +Uplifting [test_8s] best 42215 combination zp ZP_BYTE:84 [ test_8s::dividend#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:107 [ test_8u::dividend#0 ] -Uplifting [test_8u] best 42179 combination zp ZP_BYTE:107 [ test_8u::dividend#0 ] +Uplifting [test_8u] best 42215 combination zp ZP_BYTE:107 [ test_8u::dividend#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:39 [ div8s::neg#4 div8s::neg#3 div8s::neg#2 ] -Uplifting [div8s] best 42179 combination zp ZP_BYTE:39 [ div8s::neg#4 div8s::neg#3 div8s::neg#2 ] +Uplifting [div8s] best 42215 combination zp ZP_BYTE:39 [ div8s::neg#4 div8s::neg#3 div8s::neg#2 ] Attempting to uplift remaining variables inzp ZP_BYTE:95 [ divr8u::return#0 ] -Uplifting [divr8u] best 42173 combination reg byte a [ divr8u::return#0 ] +Uplifting [divr8u] best 42209 combination reg byte a [ divr8u::return#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:96 [ div8u::return#0 ] +Uplifting [div8u] best 42173 combination reg byte a [ div8u::return#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:108 [ test_8u::divisor#0 ] Uplifting [test_8u] best 42173 combination zp ZP_BYTE:108 [ test_8u::divisor#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:85 [ test_8s::divisor#0 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/test-keyboard.asm b/src/test/java/dk/camelot64/kickc/test/ref/test-keyboard.asm index f0ad0080f..4140e5012 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/test-keyboard.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/test-keyboard.asm @@ -61,7 +61,7 @@ main: { .label sc = 2 .label screen = 2 .label row = 4 - .label i = 4 + .label ch = 4 lda #<$400 sta sc lda #>$400 @@ -130,10 +130,11 @@ main: { bcc !+ inc screen+1 !: - lda #0 - sta i - tax + ldx #0 + txa + sta ch b10: + ldy ch jsr keyboard_get_keycode cmp #$3f beq b11 @@ -141,21 +142,23 @@ main: { jsr keyboard_key_pressed cmp #0 beq b11 - ldy i txa + tay + lda ch sta (screen),y - inc i - b11: inx - cpx #$40 + b11: + inc ch + lda ch + cmp #$40 bne b10 b13: + txa + tay lda #' ' - ldy i sta (screen),y - inc i - lda i - cmp #5 + inx + cpx #5 bcc b13 jmp b5 b8: @@ -186,7 +189,7 @@ keyboard_matrix_read: { rts } keyboard_get_keycode: { - lda keyboard_char_keycodes,x + lda keyboard_char_keycodes,y rts } keyboard_init: { diff --git a/src/test/java/dk/camelot64/kickc/test/ref/test-keyboard.log b/src/test/java/dk/camelot64/kickc/test/ref/test-keyboard.log index 27d0ed2cf..0a58b1885 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/test-keyboard.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/test-keyboard.log @@ -2990,25 +2990,30 @@ Uplift Scope [keyboard_key_pressed] 202: zp ZP_BYTE:20 [ keyboard_key_pressed::r Uplift Scope [keyboard_init] Uplift Scope [] -Uplifting [main] best 79424 combination reg byte y [ main::col#2 main::col#1 ] reg byte a [ main::$5 ] reg byte x [ main::row_pressed_bits#2 main::row_pressed_bits#0 main::row_pressed_bits#1 ] zp ZP_BYTE:10 [ main::i#4 main::i#10 main::i#6 main::i#1 main::i#2 ] zp ZP_WORD:5 [ main::screen#13 main::screen#1 ] reg byte a [ main::$16 ] reg byte x [ main::ch#2 main::ch#1 ] zp ZP_BYTE:4 [ main::row#2 main::row#1 ] zp ZP_BYTE:18 [ main::key#0 ] zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] zp ZP_WORD:14 [ main::screen#2 ] -Limited combination testing to 1000 combinations of 15552 possible. -Uplifting [keyboard_matrix_read] best 78406 combination reg byte y [ keyboard_matrix_read::rowid#2 keyboard_matrix_read::rowid#0 keyboard_matrix_read::rowid#1 ] reg byte a [ keyboard_matrix_read::return#3 ] reg byte a [ keyboard_matrix_read::return#0 ] reg byte a [ keyboard_matrix_read::return#2 ] -Uplifting [keyboard_get_keycode] best 77200 combination reg byte a [ keyboard_get_keycode::return#2 ] reg byte x [ keyboard_get_keycode::ch#0 ] reg byte a [ keyboard_get_keycode::return#0 ] -Uplifting [keyboard_key_pressed] best 75985 combination reg byte a [ keyboard_key_pressed::return#2 ] reg byte y [ keyboard_key_pressed::key#0 ] reg byte a [ keyboard_key_pressed::return#0 ] reg byte a [ keyboard_key_pressed::rowidx#0 ] reg byte a [ keyboard_key_pressed::$2 ] zp ZP_BYTE:22 [ keyboard_key_pressed::colidx#0 ] -Limited combination testing to 1000 combinations of 2304 possible. -Uplifting [keyboard_init] best 75985 combination -Uplifting [] best 75985 combination -Attempting to uplift remaining variables inzp ZP_BYTE:10 [ main::i#4 main::i#10 main::i#6 main::i#1 main::i#2 ] -Uplifting [main] best 75985 combination zp ZP_BYTE:10 [ main::i#4 main::i#10 main::i#6 main::i#1 main::i#2 ] +Uplifting [main] best 80124 combination reg byte y [ main::col#2 main::col#1 ] reg byte a [ main::$5 ] reg byte x [ main::row_pressed_bits#2 main::row_pressed_bits#0 main::row_pressed_bits#1 ] reg byte x [ main::i#4 main::i#10 main::i#6 main::i#1 main::i#2 ] zp ZP_WORD:5 [ main::screen#13 main::screen#1 ] zp ZP_BYTE:21 [ main::$16 ] zp ZP_BYTE:9 [ main::ch#2 main::ch#1 ] zp ZP_BYTE:4 [ main::row#2 main::row#1 ] zp ZP_BYTE:18 [ main::key#0 ] zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] zp ZP_WORD:14 [ main::screen#2 ] +Limited combination testing to 100 combinations of 15552 possible. +Uplifting [keyboard_matrix_read] best 79106 combination reg byte y [ keyboard_matrix_read::rowid#2 keyboard_matrix_read::rowid#0 keyboard_matrix_read::rowid#1 ] reg byte a [ keyboard_matrix_read::return#3 ] reg byte a [ keyboard_matrix_read::return#0 ] reg byte a [ keyboard_matrix_read::return#2 ] +Limited combination testing to 100 combinations of 256 possible. +Uplifting [keyboard_get_keycode] best 77900 combination reg byte a [ keyboard_get_keycode::return#2 ] reg byte y [ keyboard_get_keycode::ch#0 ] reg byte a [ keyboard_get_keycode::return#0 ] +Uplifting [keyboard_key_pressed] best 76691 combination reg byte a [ keyboard_key_pressed::return#2 ] reg byte y [ keyboard_key_pressed::key#0 ] reg byte a [ keyboard_key_pressed::return#0 ] reg byte a [ keyboard_key_pressed::rowidx#0 ] zp ZP_BYTE:25 [ keyboard_key_pressed::$2 ] zp ZP_BYTE:22 [ keyboard_key_pressed::colidx#0 ] +Limited combination testing to 100 combinations of 2304 possible. +Uplifting [keyboard_init] best 76691 combination +Uplifting [] best 76691 combination +Attempting to uplift remaining variables inzp ZP_BYTE:21 [ main::$16 ] +Uplifting [main] best 76291 combination reg byte a [ main::$16 ] +Attempting to uplift remaining variables inzp ZP_BYTE:9 [ main::ch#2 main::ch#1 ] +Uplifting [main] best 76291 combination zp ZP_BYTE:9 [ main::ch#2 main::ch#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:4 [ main::row#2 main::row#1 ] -Uplifting [main] best 75985 combination zp ZP_BYTE:4 [ main::row#2 main::row#1 ] +Uplifting [main] best 76291 combination zp ZP_BYTE:4 [ main::row#2 main::row#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:18 [ main::key#0 ] -Uplifting [main] best 75285 combination reg byte a [ main::key#0 ] +Uplifting [main] best 75591 combination reg byte a [ main::key#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:25 [ keyboard_key_pressed::$2 ] +Uplifting [keyboard_key_pressed] best 75585 combination reg byte a [ keyboard_key_pressed::$2 ] Attempting to uplift remaining variables inzp ZP_BYTE:22 [ keyboard_key_pressed::colidx#0 ] -Uplifting [keyboard_key_pressed] best 75285 combination zp ZP_BYTE:22 [ keyboard_key_pressed::colidx#0 ] +Uplifting [keyboard_key_pressed] best 75585 combination zp ZP_BYTE:22 [ keyboard_key_pressed::colidx#0 ] Coalescing zero page register with common assignment [ zp ZP_WORD:5 [ main::screen#13 main::screen#1 ] ] with [ zp ZP_WORD:14 [ main::screen#2 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:2 [ main::sc#2 main::sc#1 ] ] with [ zp ZP_WORD:5 [ main::screen#13 main::screen#1 main::screen#2 ] ] -Coalescing zero page register [ zp ZP_BYTE:4 [ main::row#2 main::row#1 ] ] with [ zp ZP_BYTE:10 [ main::i#4 main::i#10 main::i#6 main::i#1 main::i#2 ] ] +Coalescing zero page register [ zp ZP_BYTE:4 [ main::row#2 main::row#1 ] ] with [ zp ZP_BYTE:9 [ main::ch#2 main::ch#1 ] ] Allocated (was zp ZP_BYTE:22) zp ZP_BYTE:5 [ keyboard_key_pressed::colidx#0 ] ASSEMBLER BEFORE OPTIMIZATION @@ -3093,7 +3098,7 @@ main: { .label sc = 2 .label screen = 2 .label row = 4 - .label i = 4 + .label ch = 4 //SEG10 [5] phi from main to main::@1 [phi:main->main::@1] b1_from_main: //SEG11 [5] phi (byte*) main::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main->main::@1#0] -- pbuz1=pbuc1 @@ -3248,11 +3253,11 @@ main: { !: //SEG62 [30] phi from main::@21 to main::@10 [phi:main::@21->main::@10] b10_from_b21: - //SEG63 [30] phi (byte) main::i#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@21->main::@10#0] -- vbuz1=vbuc1 - lda #0 - sta i - //SEG64 [30] phi (byte) main::ch#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@21->main::@10#1] -- vbuxx=vbuc1 + //SEG63 [30] phi (byte) main::i#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@21->main::@10#0] -- vbuxx=vbuc1 ldx #0 + //SEG64 [30] phi (byte) main::ch#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@21->main::@10#1] -- vbuz1=vbuc1 + lda #0 + sta ch jmp b10 //SEG65 [30] phi from main::@11 to main::@10 [phi:main::@11->main::@10] b10_from_b11: @@ -3261,8 +3266,8 @@ main: { jmp b10 //SEG68 main::@10 b10: - //SEG69 [31] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::ch#0 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::ch#0 ] ) - // (byte) keyboard_get_keycode::ch#0 = (byte) main::ch#2 // register copy reg byte x + //SEG69 [31] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::ch#0 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::ch#0 ] ) -- vbuyy=vbuz1 + ldy ch //SEG70 [32] call keyboard_get_keycode param-assignment [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#0 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#0 ] ) jsr keyboard_get_keycode //SEG71 [33] (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#0 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#2 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#2 ] ) @@ -3295,12 +3300,13 @@ main: { jmp b23 //SEG82 main::@23 b23: - //SEG83 [41] *((byte*) main::screen#2 + (byte) main::i#10) ← (byte) main::ch#2 [ main::screen#2 main::ch#2 main::i#10 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 ] ) -- pbuz1_derefidx_vbuz2=vbuxx - ldy i + //SEG83 [41] *((byte*) main::screen#2 + (byte) main::i#10) ← (byte) main::ch#2 [ main::screen#2 main::ch#2 main::i#10 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 ] ) -- pbuz1_derefidx_vbuxx=vbuz2 txa + tay + lda ch sta (screen),y - //SEG84 [42] (byte) main::i#1 ← ++ (byte) main::i#10 [ main::screen#2 main::ch#2 main::i#1 ] ( main:2 [ main::screen#2 main::ch#2 main::i#1 ] ) -- vbuz1=_inc_vbuz1 - inc i + //SEG84 [42] (byte) main::i#1 ← ++ (byte) main::i#10 [ main::screen#2 main::ch#2 main::i#1 ] ( main:2 [ main::screen#2 main::ch#2 main::i#1 ] ) -- vbuxx=_inc_vbuxx + inx //SEG85 [43] phi from main::@23 main::@29 main::@30 to main::@11 [phi:main::@23/main::@29/main::@30->main::@11] b11_from_b23: b11_from_b29: @@ -3309,10 +3315,11 @@ main: { jmp b11 //SEG87 main::@11 b11: - //SEG88 [44] (byte) main::ch#1 ← ++ (byte) main::ch#2 [ main::screen#2 main::ch#1 main::i#6 ] ( main:2 [ main::screen#2 main::ch#1 main::i#6 ] ) -- vbuxx=_inc_vbuxx - inx - //SEG89 [45] if((byte) main::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 64) goto main::@10 [ main::screen#2 main::ch#1 main::i#6 ] ( main:2 [ main::screen#2 main::ch#1 main::i#6 ] ) -- vbuxx_neq_vbuc1_then_la1 - cpx #$40 + //SEG88 [44] (byte) main::ch#1 ← ++ (byte) main::ch#2 [ main::screen#2 main::ch#1 main::i#6 ] ( main:2 [ main::screen#2 main::ch#1 main::i#6 ] ) -- vbuz1=_inc_vbuz1 + inc ch + //SEG89 [45] if((byte) main::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 64) goto main::@10 [ main::screen#2 main::ch#1 main::i#6 ] ( main:2 [ main::screen#2 main::ch#1 main::i#6 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda ch + cmp #$40 bne b10_from_b11 //SEG90 [46] phi from main::@11 main::@13 to main::@13 [phi:main::@11/main::@13->main::@13] b13_from_b11: @@ -3321,15 +3328,15 @@ main: { jmp b13 //SEG92 main::@13 b13: - //SEG93 [47] *((byte*) main::screen#2 + (byte) main::i#4) ← (byte) ' ' [ main::screen#2 main::i#4 ] ( main:2 [ main::screen#2 main::i#4 ] ) -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG93 [47] *((byte*) main::screen#2 + (byte) main::i#4) ← (byte) ' ' [ main::screen#2 main::i#4 ] ( main:2 [ main::screen#2 main::i#4 ] ) -- pbuz1_derefidx_vbuxx=vbuc1 + txa + tay lda #' ' - ldy i sta (screen),y - //SEG94 [48] (byte) main::i#2 ← ++ (byte) main::i#4 [ main::screen#2 main::i#2 ] ( main:2 [ main::screen#2 main::i#2 ] ) -- vbuz1=_inc_vbuz1 - inc i - //SEG95 [49] if((byte) main::i#2<(byte/signed byte/word/signed word/dword/signed dword) 5) goto main::@13 [ main::screen#2 main::i#2 ] ( main:2 [ main::screen#2 main::i#2 ] ) -- vbuz1_lt_vbuc1_then_la1 - lda i - cmp #5 + //SEG94 [48] (byte) main::i#2 ← ++ (byte) main::i#4 [ main::screen#2 main::i#2 ] ( main:2 [ main::screen#2 main::i#2 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG95 [49] if((byte) main::i#2<(byte/signed byte/word/signed word/dword/signed dword) 5) goto main::@13 [ main::screen#2 main::i#2 ] ( main:2 [ main::screen#2 main::i#2 ] ) -- vbuxx_lt_vbuc1_then_la1 + cpx #5 bcc b13_from_b13 jmp b2 //SEG96 main::@8 @@ -3390,8 +3397,8 @@ keyboard_matrix_read: { } //SEG116 keyboard_get_keycode keyboard_get_keycode: { - //SEG117 [63] (byte) keyboard_get_keycode::return#0 ← *((const byte[]) keyboard_char_keycodes#0 + (byte) keyboard_get_keycode::ch#0) [ keyboard_get_keycode::return#0 ] ( main:2::keyboard_get_keycode:32 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#0 ] ) -- vbuaa=pbuc1_derefidx_vbuxx - lda keyboard_char_keycodes,x + //SEG117 [63] (byte) keyboard_get_keycode::return#0 ← *((const byte[]) keyboard_char_keycodes#0 + (byte) keyboard_get_keycode::ch#0) [ keyboard_get_keycode::return#0 ] ( main:2::keyboard_get_keycode:32 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#0 ] ) -- vbuaa=pbuc1_derefidx_vbuyy + lda keyboard_char_keycodes,y jmp breturn //SEG118 keyboard_get_keycode::@return breturn: @@ -3443,7 +3450,7 @@ Removing instruction jmp breturn Removing instruction jmp breturn Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination -Replacing instruction ldx #0 with TAX +Replacing instruction lda #0 with TXA Replacing label b1_from_b1 with b1 Replacing label b1_from_b1 with b1 Replacing label b7_from_b9 with b7 @@ -3623,7 +3630,7 @@ FINAL SYMBOL TABLE (byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch) (label) keyboard_get_keycode::@return (byte) keyboard_get_keycode::ch -(byte) keyboard_get_keycode::ch#0 reg byte x 103.0 +(byte) keyboard_get_keycode::ch#0 reg byte y 103.0 (byte) keyboard_get_keycode::return (byte) keyboard_get_keycode::return#0 reg byte a 34.33333333333333 (byte) keyboard_get_keycode::return#2 reg byte a 202.0 @@ -3681,17 +3688,17 @@ FINAL SYMBOL TABLE (label) main::@9 (label) main::@return (byte) main::ch -(byte) main::ch#1 reg byte x 151.5 -(byte) main::ch#2 reg byte x 28.857142857142858 +(byte) main::ch#1 ch zp ZP_BYTE:4 151.5 +(byte) main::ch#2 ch zp ZP_BYTE:4 28.857142857142858 (byte) main::col (byte) main::col#1 reg byte y 1501.5 (byte) main::col#2 reg byte y 667.3333333333334 (byte) main::i -(byte) main::i#1 i zp ZP_BYTE:4 202.0 -(byte) main::i#10 i zp ZP_BYTE:4 42.08333333333333 -(byte) main::i#2 i zp ZP_BYTE:4 151.5 -(byte) main::i#4 i zp ZP_BYTE:4 202.0 -(byte) main::i#6 i zp ZP_BYTE:4 168.33333333333331 +(byte) main::i#1 reg byte x 202.0 +(byte) main::i#10 reg byte x 42.08333333333333 +(byte) main::i#2 reg byte x 151.5 +(byte) main::i#4 reg byte x 202.0 +(byte) main::i#6 reg byte x 168.33333333333331 (byte) main::key (byte) main::key#0 reg byte a 151.5 (byte) main::row @@ -3710,14 +3717,14 @@ FINAL SYMBOL TABLE (byte*) main::screen#2 screen zp ZP_WORD:2 10.142857142857142 zp ZP_WORD:2 [ main::sc#2 main::sc#1 main::screen#13 main::screen#1 main::screen#2 ] -zp ZP_BYTE:4 [ main::row#2 main::row#1 main::i#4 main::i#10 main::i#6 main::i#1 main::i#2 ] +zp ZP_BYTE:4 [ main::row#2 main::row#1 main::ch#2 main::ch#1 ] reg byte x [ main::row_pressed_bits#2 main::row_pressed_bits#0 main::row_pressed_bits#1 ] reg byte y [ main::col#2 main::col#1 ] -reg byte x [ main::ch#2 main::ch#1 ] +reg byte x [ main::i#4 main::i#10 main::i#6 main::i#1 main::i#2 ] reg byte y [ keyboard_matrix_read::rowid#2 keyboard_matrix_read::rowid#0 keyboard_matrix_read::rowid#1 ] reg byte a [ keyboard_matrix_read::return#3 ] reg byte a [ main::$5 ] -reg byte x [ keyboard_get_keycode::ch#0 ] +reg byte y [ keyboard_get_keycode::ch#0 ] reg byte a [ keyboard_get_keycode::return#2 ] reg byte a [ main::key#0 ] reg byte y [ keyboard_key_pressed::key#0 ] @@ -3733,7 +3740,7 @@ reg byte a [ keyboard_get_keycode::return#0 ] FINAL ASSEMBLER -Score: 56527 +Score: 56827 //SEG0 Basic Upstart .pc = $801 "Basic" @@ -3808,7 +3815,7 @@ main: { .label sc = 2 .label screen = 2 .label row = 4 - .label i = 4 + .label ch = 4 //SEG10 [5] phi from main to main::@1 [phi:main->main::@1] //SEG11 [5] phi (byte*) main::sc#2 = ((byte*))(word/signed word/dword/signed dword) 1024 [phi:main->main::@1#0] -- pbuz1=pbuc1 lda #<$400 @@ -3931,18 +3938,18 @@ main: { inc screen+1 !: //SEG62 [30] phi from main::@21 to main::@10 [phi:main::@21->main::@10] - //SEG63 [30] phi (byte) main::i#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@21->main::@10#0] -- vbuz1=vbuc1 - lda #0 - sta i - //SEG64 [30] phi (byte) main::ch#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@21->main::@10#1] -- vbuxx=vbuc1 - tax + //SEG63 [30] phi (byte) main::i#10 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@21->main::@10#0] -- vbuxx=vbuc1 + ldx #0 + //SEG64 [30] phi (byte) main::ch#2 = (byte/signed byte/word/signed word/dword/signed dword) 0 [phi:main::@21->main::@10#1] -- vbuz1=vbuc1 + txa + sta ch //SEG65 [30] phi from main::@11 to main::@10 [phi:main::@11->main::@10] //SEG66 [30] phi (byte) main::i#10 = (byte) main::i#6 [phi:main::@11->main::@10#0] -- register_copy //SEG67 [30] phi (byte) main::ch#2 = (byte) main::ch#1 [phi:main::@11->main::@10#1] -- register_copy //SEG68 main::@10 b10: - //SEG69 [31] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::ch#0 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::ch#0 ] ) - // (byte) keyboard_get_keycode::ch#0 = (byte) main::ch#2 // register copy reg byte x + //SEG69 [31] (byte) keyboard_get_keycode::ch#0 ← (byte) main::ch#2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::ch#0 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::ch#0 ] ) -- vbuyy=vbuz1 + ldy ch //SEG70 [32] call keyboard_get_keycode param-assignment [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#0 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#0 ] ) jsr keyboard_get_keycode //SEG71 [33] (byte) keyboard_get_keycode::return#2 ← (byte) keyboard_get_keycode::return#0 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#2 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#2 ] ) @@ -3967,34 +3974,36 @@ main: { cmp #0 beq b11 //SEG82 main::@23 - //SEG83 [41] *((byte*) main::screen#2 + (byte) main::i#10) ← (byte) main::ch#2 [ main::screen#2 main::ch#2 main::i#10 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 ] ) -- pbuz1_derefidx_vbuz2=vbuxx - ldy i + //SEG83 [41] *((byte*) main::screen#2 + (byte) main::i#10) ← (byte) main::ch#2 [ main::screen#2 main::ch#2 main::i#10 ] ( main:2 [ main::screen#2 main::ch#2 main::i#10 ] ) -- pbuz1_derefidx_vbuxx=vbuz2 txa + tay + lda ch sta (screen),y - //SEG84 [42] (byte) main::i#1 ← ++ (byte) main::i#10 [ main::screen#2 main::ch#2 main::i#1 ] ( main:2 [ main::screen#2 main::ch#2 main::i#1 ] ) -- vbuz1=_inc_vbuz1 - inc i + //SEG84 [42] (byte) main::i#1 ← ++ (byte) main::i#10 [ main::screen#2 main::ch#2 main::i#1 ] ( main:2 [ main::screen#2 main::ch#2 main::i#1 ] ) -- vbuxx=_inc_vbuxx + inx //SEG85 [43] phi from main::@23 main::@29 main::@30 to main::@11 [phi:main::@23/main::@29/main::@30->main::@11] //SEG86 [43] phi (byte) main::i#6 = (byte) main::i#1 [phi:main::@23/main::@29/main::@30->main::@11#0] -- register_copy //SEG87 main::@11 b11: - //SEG88 [44] (byte) main::ch#1 ← ++ (byte) main::ch#2 [ main::screen#2 main::ch#1 main::i#6 ] ( main:2 [ main::screen#2 main::ch#1 main::i#6 ] ) -- vbuxx=_inc_vbuxx - inx - //SEG89 [45] if((byte) main::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 64) goto main::@10 [ main::screen#2 main::ch#1 main::i#6 ] ( main:2 [ main::screen#2 main::ch#1 main::i#6 ] ) -- vbuxx_neq_vbuc1_then_la1 - cpx #$40 + //SEG88 [44] (byte) main::ch#1 ← ++ (byte) main::ch#2 [ main::screen#2 main::ch#1 main::i#6 ] ( main:2 [ main::screen#2 main::ch#1 main::i#6 ] ) -- vbuz1=_inc_vbuz1 + inc ch + //SEG89 [45] if((byte) main::ch#1!=(byte/signed byte/word/signed word/dword/signed dword) 64) goto main::@10 [ main::screen#2 main::ch#1 main::i#6 ] ( main:2 [ main::screen#2 main::ch#1 main::i#6 ] ) -- vbuz1_neq_vbuc1_then_la1 + lda ch + cmp #$40 bne b10 //SEG90 [46] phi from main::@11 main::@13 to main::@13 [phi:main::@11/main::@13->main::@13] //SEG91 [46] phi (byte) main::i#4 = (byte) main::i#6 [phi:main::@11/main::@13->main::@13#0] -- register_copy //SEG92 main::@13 b13: - //SEG93 [47] *((byte*) main::screen#2 + (byte) main::i#4) ← (byte) ' ' [ main::screen#2 main::i#4 ] ( main:2 [ main::screen#2 main::i#4 ] ) -- pbuz1_derefidx_vbuz2=vbuc1 + //SEG93 [47] *((byte*) main::screen#2 + (byte) main::i#4) ← (byte) ' ' [ main::screen#2 main::i#4 ] ( main:2 [ main::screen#2 main::i#4 ] ) -- pbuz1_derefidx_vbuxx=vbuc1 + txa + tay lda #' ' - ldy i sta (screen),y - //SEG94 [48] (byte) main::i#2 ← ++ (byte) main::i#4 [ main::screen#2 main::i#2 ] ( main:2 [ main::screen#2 main::i#2 ] ) -- vbuz1=_inc_vbuz1 - inc i - //SEG95 [49] if((byte) main::i#2<(byte/signed byte/word/signed word/dword/signed dword) 5) goto main::@13 [ main::screen#2 main::i#2 ] ( main:2 [ main::screen#2 main::i#2 ] ) -- vbuz1_lt_vbuc1_then_la1 - lda i - cmp #5 + //SEG94 [48] (byte) main::i#2 ← ++ (byte) main::i#4 [ main::screen#2 main::i#2 ] ( main:2 [ main::screen#2 main::i#2 ] ) -- vbuxx=_inc_vbuxx + inx + //SEG95 [49] if((byte) main::i#2<(byte/signed byte/word/signed word/dword/signed dword) 5) goto main::@13 [ main::screen#2 main::i#2 ] ( main:2 [ main::screen#2 main::i#2 ] ) -- vbuxx_lt_vbuc1_then_la1 + cpx #5 bcc b13 jmp b5 //SEG96 main::@8 @@ -4048,8 +4057,8 @@ keyboard_matrix_read: { } //SEG116 keyboard_get_keycode keyboard_get_keycode: { - //SEG117 [63] (byte) keyboard_get_keycode::return#0 ← *((const byte[]) keyboard_char_keycodes#0 + (byte) keyboard_get_keycode::ch#0) [ keyboard_get_keycode::return#0 ] ( main:2::keyboard_get_keycode:32 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#0 ] ) -- vbuaa=pbuc1_derefidx_vbuxx - lda keyboard_char_keycodes,x + //SEG117 [63] (byte) keyboard_get_keycode::return#0 ← *((const byte[]) keyboard_char_keycodes#0 + (byte) keyboard_get_keycode::ch#0) [ keyboard_get_keycode::return#0 ] ( main:2::keyboard_get_keycode:32 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#0 ] ) -- vbuaa=pbuc1_derefidx_vbuyy + lda keyboard_char_keycodes,y //SEG118 keyboard_get_keycode::@return //SEG119 [64] return [ keyboard_get_keycode::return#0 ] ( main:2::keyboard_get_keycode:32 [ main::screen#2 main::ch#2 main::i#10 keyboard_get_keycode::return#0 ] ) rts diff --git a/src/test/java/dk/camelot64/kickc/test/ref/test-keyboard.sym b/src/test/java/dk/camelot64/kickc/test/ref/test-keyboard.sym index a210bed45..644c0db82 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/test-keyboard.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/test-keyboard.sym @@ -116,7 +116,7 @@ (byte()) keyboard_get_keycode((byte) keyboard_get_keycode::ch) (label) keyboard_get_keycode::@return (byte) keyboard_get_keycode::ch -(byte) keyboard_get_keycode::ch#0 reg byte x 103.0 +(byte) keyboard_get_keycode::ch#0 reg byte y 103.0 (byte) keyboard_get_keycode::return (byte) keyboard_get_keycode::return#0 reg byte a 34.33333333333333 (byte) keyboard_get_keycode::return#2 reg byte a 202.0 @@ -174,17 +174,17 @@ (label) main::@9 (label) main::@return (byte) main::ch -(byte) main::ch#1 reg byte x 151.5 -(byte) main::ch#2 reg byte x 28.857142857142858 +(byte) main::ch#1 ch zp ZP_BYTE:4 151.5 +(byte) main::ch#2 ch zp ZP_BYTE:4 28.857142857142858 (byte) main::col (byte) main::col#1 reg byte y 1501.5 (byte) main::col#2 reg byte y 667.3333333333334 (byte) main::i -(byte) main::i#1 i zp ZP_BYTE:4 202.0 -(byte) main::i#10 i zp ZP_BYTE:4 42.08333333333333 -(byte) main::i#2 i zp ZP_BYTE:4 151.5 -(byte) main::i#4 i zp ZP_BYTE:4 202.0 -(byte) main::i#6 i zp ZP_BYTE:4 168.33333333333331 +(byte) main::i#1 reg byte x 202.0 +(byte) main::i#10 reg byte x 42.08333333333333 +(byte) main::i#2 reg byte x 151.5 +(byte) main::i#4 reg byte x 202.0 +(byte) main::i#6 reg byte x 168.33333333333331 (byte) main::key (byte) main::key#0 reg byte a 151.5 (byte) main::row @@ -203,14 +203,14 @@ (byte*) main::screen#2 screen zp ZP_WORD:2 10.142857142857142 zp ZP_WORD:2 [ main::sc#2 main::sc#1 main::screen#13 main::screen#1 main::screen#2 ] -zp ZP_BYTE:4 [ main::row#2 main::row#1 main::i#4 main::i#10 main::i#6 main::i#1 main::i#2 ] +zp ZP_BYTE:4 [ main::row#2 main::row#1 main::ch#2 main::ch#1 ] reg byte x [ main::row_pressed_bits#2 main::row_pressed_bits#0 main::row_pressed_bits#1 ] reg byte y [ main::col#2 main::col#1 ] -reg byte x [ main::ch#2 main::ch#1 ] +reg byte x [ main::i#4 main::i#10 main::i#6 main::i#1 main::i#2 ] reg byte y [ keyboard_matrix_read::rowid#2 keyboard_matrix_read::rowid#0 keyboard_matrix_read::rowid#1 ] reg byte a [ keyboard_matrix_read::return#3 ] reg byte a [ main::$5 ] -reg byte x [ keyboard_get_keycode::ch#0 ] +reg byte y [ keyboard_get_keycode::ch#0 ] reg byte a [ keyboard_get_keycode::return#2 ] reg byte a [ main::key#0 ] reg byte y [ keyboard_key_pressed::key#0 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/test-multiply-16bit.log b/src/test/java/dk/camelot64/kickc/test/ref/test-multiply-16bit.log index e7fdeb0e8..4878c0522 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/test-multiply-16bit.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/test-multiply-16bit.log @@ -9296,23 +9296,25 @@ Uplifting [muls16u] best 520902 combination zp ZP_DWORD:62 [ muls16u::return#0 m Uplifting [mul16u_compare] best 519212 combination zp ZP_WORD:54 [ mul16u_compare::a#2 mul16u_compare::a#5 mul16u_compare::a#1 ] reg byte y [ mul16u_compare::j#2 mul16u_compare::j#1 ] zp ZP_WORD:56 [ mul16u_compare::b#2 mul16u_compare::b#5 mul16u_compare::b#1 ] reg byte a [ mul16u_compare::ok#2 ] zp ZP_DWORD:153 [ mul16u_compare::mn#0 ] reg byte x [ mul16u_compare::i#9 mul16u_compare::i#1 ] zp ZP_DWORD:145 [ mul16u_compare::ms#0 ] Uplifting [mul16s_compare] best 517522 combination zp ZP_WORD:3 [ mul16s_compare::a#2 mul16s_compare::a#5 mul16s_compare::a#1 ] reg byte y [ mul16s_compare::j#2 mul16s_compare::j#1 ] zp ZP_WORD:5 [ mul16s_compare::b#2 mul16s_compare::b#5 mul16s_compare::b#1 ] reg byte a [ mul16s_compare::ok#2 ] zp ZP_DWORD:102 [ mul16s_compare::mn#0 ] reg byte x [ mul16s_compare::i#9 mul16s_compare::i#1 ] zp ZP_DWORD:90 [ mul16s_compare::ms#0 ] Uplifting [mul16s] best 517522 combination zp ZP_DWORD:98 [ mul16s::return#2 ] zp ZP_DWORD:132 [ mul16s::return#0 ] zp ZP_DWORD:29 [ mul16s::m#4 mul16s::m#5 mul16s::m#1 mul16s::m#0 mul16s::m#2 ] zp ZP_WORD:96 [ mul16s::b#0 ] zp ZP_WORD:94 [ mul16s::a#0 ] zp ZP_WORD:124 [ mul16s::$6 ] zp ZP_WORD:126 [ mul16s::$16 ] zp ZP_WORD:128 [ mul16s::$12 ] zp ZP_WORD:130 [ mul16s::$17 ] -Uplifting [mulf_init] best 517172 combination zp ZP_WORD:72 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] reg byte x [ mulf_init::c#2 mulf_init::c#1 ] zp ZP_BYTE:71 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$2 ] reg byte a [ mulf_init::$5 ] reg byte a [ mulf_init::$6 ] zp ZP_WORD:75 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp ZP_WORD:67 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp ZP_WORD:77 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp ZP_BYTE:79 [ mulf_init::dir#2 mulf_init::dir#3 ] zp ZP_WORD:69 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] -Limited combination testing to 1000 combinations of 1024 possible. -Uplifting [] best 517172 combination zp ZP_WORD:25 [ print_char_cursor#76 print_char_cursor#120 print_char_cursor#116 print_char_cursor#117 print_char_cursor#118 print_char_cursor#130 print_char_cursor#157 print_char_cursor#158 print_char_cursor#113 print_char_cursor#112 print_char_cursor#20 print_char_cursor#1 print_char_cursor#114 ] zp ZP_WORD:9 [ print_line_cursor#20 print_line_cursor#39 print_line_cursor#1 ] -Uplifting [print_str] best 517172 combination zp ZP_WORD:11 [ print_str::str#11 print_str::str#13 print_str::str#0 ] -Uplifting [print_cls] best 517172 combination zp ZP_WORD:80 [ print_cls::sc#2 print_cls::sc#1 ] -Uplifting [print_word] best 517172 combination zp ZP_WORD:21 [ print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#1 print_word::w#2 print_word::w#11 ] -Uplifting [print_sdword] best 517172 combination zp ZP_DWORD:13 [ print_sdword::dw#4 print_sdword::dw#3 print_sdword::dw#1 print_sdword::dw#2 print_sdword::dw#0 ] -Uplifting [print_sword] best 517172 combination zp ZP_WORD:27 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 ] -Uplifting [print_byte] best 517160 combination reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] -Uplifting [print_dword] best 517160 combination zp ZP_DWORD:17 [ print_dword::dw#3 print_dword::dw#1 print_dword::dw#2 print_dword::dw#0 ] -Uplifting [print_char] best 517145 combination reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] -Uplifting [mul16u_error] best 517145 combination zp ZP_WORD:157 [ mul16u_error::a#0 ] zp ZP_WORD:159 [ mul16u_error::b#0 ] zp ZP_DWORD:161 [ mul16u_error::ms#0 ] zp ZP_DWORD:165 [ mul16u_error::mn#0 ] -Uplifting [mul16s_error] best 517145 combination zp ZP_WORD:106 [ mul16s_error::a#0 ] zp ZP_WORD:108 [ mul16s_error::b#0 ] zp ZP_DWORD:110 [ mul16s_error::ms#0 ] zp ZP_DWORD:114 [ mul16s_error::mn#0 ] -Uplifting [print_ln] best 517145 combination -Uplifting [main] best 517145 combination +Uplifting [mulf_init] best 517292 combination zp ZP_WORD:72 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] reg byte x [ mulf_init::c#2 mulf_init::c#1 ] zp ZP_BYTE:71 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$2 ] reg byte a [ mulf_init::$5 ] reg byte a [ mulf_init::$6 ] zp ZP_WORD:75 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp ZP_WORD:67 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] zp ZP_BYTE:74 [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp ZP_WORD:77 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp ZP_BYTE:79 [ mulf_init::dir#2 mulf_init::dir#3 ] zp ZP_WORD:69 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] +Limited combination testing to 100 combinations of 1024 possible. +Uplifting [] best 517292 combination zp ZP_WORD:25 [ print_char_cursor#76 print_char_cursor#120 print_char_cursor#116 print_char_cursor#117 print_char_cursor#118 print_char_cursor#130 print_char_cursor#157 print_char_cursor#158 print_char_cursor#113 print_char_cursor#112 print_char_cursor#20 print_char_cursor#1 print_char_cursor#114 ] zp ZP_WORD:9 [ print_line_cursor#20 print_line_cursor#39 print_line_cursor#1 ] +Uplifting [print_str] best 517292 combination zp ZP_WORD:11 [ print_str::str#11 print_str::str#13 print_str::str#0 ] +Uplifting [print_cls] best 517292 combination zp ZP_WORD:80 [ print_cls::sc#2 print_cls::sc#1 ] +Uplifting [print_word] best 517292 combination zp ZP_WORD:21 [ print_word::w#5 print_word::w#3 print_word::w#4 print_word::w#1 print_word::w#2 print_word::w#11 ] +Uplifting [print_sdword] best 517292 combination zp ZP_DWORD:13 [ print_sdword::dw#4 print_sdword::dw#3 print_sdword::dw#1 print_sdword::dw#2 print_sdword::dw#0 ] +Uplifting [print_sword] best 517292 combination zp ZP_WORD:27 [ print_sword::w#4 print_sword::w#3 print_sword::w#1 print_sword::w#2 print_sword::w#0 ] +Uplifting [print_byte] best 517280 combination reg byte x [ print_byte::b#2 print_byte::b#0 print_byte::b#1 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] +Uplifting [print_dword] best 517280 combination zp ZP_DWORD:17 [ print_dword::dw#3 print_dword::dw#1 print_dword::dw#2 print_dword::dw#0 ] +Uplifting [print_char] best 517265 combination reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] +Uplifting [mul16u_error] best 517265 combination zp ZP_WORD:157 [ mul16u_error::a#0 ] zp ZP_WORD:159 [ mul16u_error::b#0 ] zp ZP_DWORD:161 [ mul16u_error::ms#0 ] zp ZP_DWORD:165 [ mul16u_error::mn#0 ] +Uplifting [mul16s_error] best 517265 combination zp ZP_WORD:106 [ mul16s_error::a#0 ] zp ZP_WORD:108 [ mul16s_error::b#0 ] zp ZP_DWORD:110 [ mul16s_error::ms#0 ] zp ZP_DWORD:114 [ mul16s_error::mn#0 ] +Uplifting [print_ln] best 517265 combination +Uplifting [main] best 517265 combination Attempting to uplift remaining variables inzp ZP_BYTE:71 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] -Uplifting [mulf_init] best 517145 combination zp ZP_BYTE:71 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] +Uplifting [mulf_init] best 517265 combination zp ZP_BYTE:71 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:74 [ mulf_init::x_255#2 mulf_init::x_255#1 ] +Uplifting [mulf_init] best 517145 combination reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:79 [ mulf_init::dir#2 mulf_init::dir#3 ] Uplifting [mulf_init] best 517145 combination zp ZP_BYTE:79 [ mulf_init::dir#2 mulf_init::dir#3 ] Coalescing zero page register with common assignment [ zp ZP_WORD:3 [ mul16s_compare::a#2 mul16s_compare::a#5 mul16s_compare::a#1 ] ] with [ zp ZP_WORD:82 [ muls16s::a#0 ] ] - score: 1 diff --git a/src/test/java/dk/camelot64/kickc/test/ref/test-multiply-8bit.log b/src/test/java/dk/camelot64/kickc/test/ref/test-multiply-8bit.log index 8d0169dcd..4d27c4395 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/test-multiply-8bit.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/test-multiply-8bit.log @@ -10942,46 +10942,54 @@ Uplifting [muls8u] best 297370 combination zp ZP_WORD:38 [ muls8u::return#0 muls Uplifting [mulf8u] best 296758 combination reg byte x [ mulf8u::b#2 mulf8u::b#1 mulf8u::b#4 ] reg byte a [ mulf8u::a#2 mulf8u::a#1 mulf8u::a#4 ] zp ZP_WORD:109 [ mulf8u::return#3 ] zp ZP_WORD:101 [ mulf8u::return#0 ] zp ZP_WORD:95 [ mulf8u::return#2 ] Uplifting [mul8u_compare] best 295758 combination reg byte x [ mul8u_compare::ok#3 mul8u_compare::ok#4 ] zp ZP_BYTE:35 [ mul8u_compare::b#10 mul8u_compare::b#1 ] zp ZP_BYTE:34 [ mul8u_compare::a#7 mul8u_compare::a#1 ] zp ZP_WORD:115 [ mul8u_compare::mn#0 ] zp ZP_WORD:107 [ mul8u_compare::ms#0 ] zp ZP_WORD:111 [ mul8u_compare::mf#0 ] Uplifting [mul8s_compare] best 294758 combination reg byte x [ mul8s_compare::ok#3 mul8s_compare::ok#4 ] zp ZP_BYTE:3 [ mul8s_compare::b#10 mul8s_compare::b#1 ] zp ZP_BYTE:2 [ mul8s_compare::a#7 mul8s_compare::a#1 ] zp ZP_WORD:76 [ mul8s_compare::mn#0 ] zp ZP_WORD:64 [ mul8s_compare::ms#0 ] zp ZP_WORD:70 [ mul8s_compare::mf#0 ] -Uplifting [mulf_init] best 294408 combination zp ZP_WORD:50 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] reg byte x [ mulf_init::c#2 mulf_init::c#1 ] zp ZP_BYTE:49 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$2 ] reg byte a [ mulf_init::$5 ] reg byte a [ mulf_init::$6 ] zp ZP_WORD:53 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp ZP_WORD:45 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp ZP_WORD:55 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp ZP_BYTE:57 [ mulf_init::dir#2 mulf_init::dir#3 ] zp ZP_WORD:47 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] -Limited combination testing to 1000 combinations of 1024 possible. -Uplifting [mul8s] best 294083 combination zp ZP_WORD:74 [ mul8s::return#2 ] zp ZP_WORD:18 [ mul8s::m#4 mul8s::m#5 mul8s::m#1 mul8s::m#0 mul8s::m#2 ] reg byte y [ mul8s::b#0 ] zp ZP_BYTE:72 [ mul8s::a#0 ] reg byte a [ mul8s::$6 ] reg byte a [ mul8s::$16 ] reg byte a [ mul8s::$12 ] reg byte a [ mul8s::$17 ] -Limited combination testing to 1000 combinations of 2304 possible. -Uplifting [mulf8s] best 293758 combination zp ZP_WORD:68 [ mulf8s::return#2 ] zp ZP_WORD:26 [ mulf8s::m#4 mulf8s::m#5 mulf8s::m#1 mulf8s::m#0 mulf8s::m#2 ] zp ZP_BYTE:67 [ mulf8s::b#0 ] reg byte y [ mulf8s::a#0 ] reg byte a [ mulf8s::$6 ] reg byte a [ mulf8s::$16 ] reg byte a [ mulf8s::$12 ] reg byte a [ mulf8s::$17 ] -Limited combination testing to 1000 combinations of 1024 possible. -Uplifting [] best 293758 combination zp ZP_WORD:15 [ print_char_cursor#82 print_char_cursor#137 print_char_cursor#136 print_char_cursor#132 print_char_cursor#149 print_char_cursor#188 print_char_cursor#189 print_char_cursor#131 print_char_cursor#130 print_char_cursor#17 print_char_cursor#30 print_char_cursor#1 print_char_cursor#134 print_char_cursor#222 ] zp ZP_WORD:5 [ print_line_cursor#23 print_line_cursor#45 print_line_cursor#1 print_line_cursor#10 ] -Uplifting [mulf_tables_cmp] best 293758 combination zp ZP_WORD:40 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::kc_sqr#1 ] zp ZP_WORD:42 [ mulf_tables_cmp::asm_sqr#2 mulf_tables_cmp::asm_sqr#1 ] -Uplifting [print_str] best 293758 combination zp ZP_WORD:7 [ print_str::str#16 print_str::str#18 print_str::str#0 ] -Uplifting [print_cls] best 293758 combination zp ZP_WORD:58 [ print_cls::sc#2 print_cls::sc#1 ] -Uplifting [print_byte] best 293737 combination reg byte x [ print_byte::b#5 print_byte::b#3 print_byte::b#4 print_byte::b#9 print_byte::b#1 print_byte::b#2 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] -Uplifting [print_word] best 293737 combination zp ZP_WORD:11 [ print_word::w#6 print_word::w#3 print_word::w#4 print_word::w#5 print_word::w#11 print_word::w#12 print_word::w#13 ] -Uplifting [print_sword] best 293737 combination zp ZP_WORD:9 [ print_sword::w#5 print_sword::w#4 print_sword::w#1 print_sword::w#2 print_sword::w#3 print_sword::w#0 ] -Uplifting [print_sbyte] best 293723 combination reg byte x [ print_sbyte::b#4 print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#2 print_sbyte::b#0 ] -Uplifting [print_char] best 293708 combination reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] -Uplifting [mul8u_error] best 293702 combination reg byte x [ mul8u_error::a#0 ] zp ZP_BYTE:118 [ mul8u_error::b#0 ] zp ZP_WORD:119 [ mul8u_error::ms#0 ] zp ZP_WORD:121 [ mul8u_error::mn#0 ] zp ZP_WORD:123 [ mul8u_error::mf#0 ] -Uplifting [mul8s_error] best 293696 combination reg byte x [ mul8s_error::a#0 ] zp ZP_BYTE:79 [ mul8s_error::b#0 ] zp ZP_WORD:80 [ mul8s_error::ms#0 ] zp ZP_WORD:82 [ mul8s_error::mn#0 ] zp ZP_WORD:84 [ mul8s_error::mf#0 ] -Uplifting [print_ln] best 293696 combination -Uplifting [main] best 293696 combination -Uplifting [mulf_init_asm] best 293696 combination +Uplifting [mulf_init] best 294528 combination zp ZP_WORD:50 [ mulf_init::sqr#3 mulf_init::sqr#4 mulf_init::sqr#1 mulf_init::sqr#2 ] reg byte x [ mulf_init::c#2 mulf_init::c#1 ] zp ZP_BYTE:49 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] reg byte a [ mulf_init::$2 ] reg byte a [ mulf_init::$5 ] reg byte a [ mulf_init::$6 ] zp ZP_WORD:53 [ mulf_init::sqr2_lo#2 mulf_init::sqr2_lo#1 ] zp ZP_WORD:45 [ mulf_init::sqr1_lo#2 mulf_init::sqr1_lo#1 ] zp ZP_BYTE:52 [ mulf_init::x_255#2 mulf_init::x_255#1 ] zp ZP_WORD:55 [ mulf_init::sqr2_hi#2 mulf_init::sqr2_hi#1 ] zp ZP_BYTE:57 [ mulf_init::dir#2 mulf_init::dir#3 ] zp ZP_WORD:47 [ mulf_init::sqr1_hi#2 mulf_init::sqr1_hi#1 ] +Limited combination testing to 100 combinations of 1024 possible. +Uplifting [mul8s] best 294215 combination zp ZP_WORD:74 [ mul8s::return#2 ] zp ZP_WORD:18 [ mul8s::m#4 mul8s::m#5 mul8s::m#1 mul8s::m#0 mul8s::m#2 ] reg byte y [ mul8s::b#0 ] zp ZP_BYTE:72 [ mul8s::a#0 ] reg byte a [ mul8s::$6 ] reg byte a [ mul8s::$16 ] zp ZP_BYTE:92 [ mul8s::$12 ] zp ZP_BYTE:93 [ mul8s::$17 ] +Limited combination testing to 100 combinations of 2304 possible. +Uplifting [mulf8s] best 293896 combination zp ZP_WORD:68 [ mulf8s::return#2 ] zp ZP_WORD:26 [ mulf8s::m#4 mulf8s::m#5 mulf8s::m#1 mulf8s::m#0 mulf8s::m#2 ] zp ZP_BYTE:67 [ mulf8s::b#0 ] reg byte y [ mulf8s::a#0 ] reg byte a [ mulf8s::$6 ] reg byte a [ mulf8s::$16 ] reg byte a [ mulf8s::$12 ] zp ZP_BYTE:100 [ mulf8s::$17 ] +Limited combination testing to 100 combinations of 1024 possible. +Uplifting [] best 293896 combination zp ZP_WORD:15 [ print_char_cursor#82 print_char_cursor#137 print_char_cursor#136 print_char_cursor#132 print_char_cursor#149 print_char_cursor#188 print_char_cursor#189 print_char_cursor#131 print_char_cursor#130 print_char_cursor#17 print_char_cursor#30 print_char_cursor#1 print_char_cursor#134 print_char_cursor#222 ] zp ZP_WORD:5 [ print_line_cursor#23 print_line_cursor#45 print_line_cursor#1 print_line_cursor#10 ] +Uplifting [mulf_tables_cmp] best 293896 combination zp ZP_WORD:40 [ mulf_tables_cmp::kc_sqr#2 mulf_tables_cmp::kc_sqr#1 ] zp ZP_WORD:42 [ mulf_tables_cmp::asm_sqr#2 mulf_tables_cmp::asm_sqr#1 ] +Uplifting [print_str] best 293896 combination zp ZP_WORD:7 [ print_str::str#16 print_str::str#18 print_str::str#0 ] +Uplifting [print_cls] best 293896 combination zp ZP_WORD:58 [ print_cls::sc#2 print_cls::sc#1 ] +Uplifting [print_byte] best 293875 combination reg byte x [ print_byte::b#5 print_byte::b#3 print_byte::b#4 print_byte::b#9 print_byte::b#1 print_byte::b#2 ] reg byte a [ print_byte::$0 ] reg byte a [ print_byte::$2 ] +Uplifting [print_word] best 293875 combination zp ZP_WORD:11 [ print_word::w#6 print_word::w#3 print_word::w#4 print_word::w#5 print_word::w#11 print_word::w#12 print_word::w#13 ] +Uplifting [print_sword] best 293875 combination zp ZP_WORD:9 [ print_sword::w#5 print_sword::w#4 print_sword::w#1 print_sword::w#2 print_sword::w#3 print_sword::w#0 ] +Uplifting [print_sbyte] best 293861 combination reg byte x [ print_sbyte::b#4 print_sbyte::b#3 print_sbyte::b#1 print_sbyte::b#2 print_sbyte::b#0 ] +Uplifting [print_char] best 293846 combination reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ] +Uplifting [mul8u_error] best 293840 combination reg byte x [ mul8u_error::a#0 ] zp ZP_BYTE:118 [ mul8u_error::b#0 ] zp ZP_WORD:119 [ mul8u_error::ms#0 ] zp ZP_WORD:121 [ mul8u_error::mn#0 ] zp ZP_WORD:123 [ mul8u_error::mf#0 ] +Uplifting [mul8s_error] best 293834 combination reg byte x [ mul8s_error::a#0 ] zp ZP_BYTE:79 [ mul8s_error::b#0 ] zp ZP_WORD:80 [ mul8s_error::ms#0 ] zp ZP_WORD:82 [ mul8s_error::mn#0 ] zp ZP_WORD:84 [ mul8s_error::mf#0 ] +Uplifting [print_ln] best 293834 combination +Uplifting [main] best 293834 combination +Uplifting [mulf_init_asm] best 293834 combination Attempting to uplift remaining variables inzp ZP_BYTE:60 [ muls8s::a#0 ] -Uplifting [muls8s] best 293696 combination zp ZP_BYTE:60 [ muls8s::a#0 ] +Uplifting [muls8s] best 293834 combination zp ZP_BYTE:60 [ muls8s::a#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:3 [ mul8s_compare::b#10 mul8s_compare::b#1 ] -Uplifting [mul8s_compare] best 293696 combination zp ZP_BYTE:3 [ mul8s_compare::b#10 mul8s_compare::b#1 ] +Uplifting [mul8s_compare] best 293834 combination zp ZP_BYTE:3 [ mul8s_compare::b#10 mul8s_compare::b#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:35 [ mul8u_compare::b#10 mul8u_compare::b#1 ] -Uplifting [mul8u_compare] best 293696 combination zp ZP_BYTE:35 [ mul8u_compare::b#10 mul8u_compare::b#1 ] +Uplifting [mul8u_compare] best 293834 combination zp ZP_BYTE:35 [ mul8u_compare::b#10 mul8u_compare::b#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:103 [ muls8u::a#0 ] -Uplifting [muls8u] best 293696 combination zp ZP_BYTE:103 [ muls8u::a#0 ] +Uplifting [muls8u] best 293834 combination zp ZP_BYTE:103 [ muls8u::a#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:2 [ mul8s_compare::a#7 mul8s_compare::a#1 ] -Uplifting [mul8s_compare] best 293696 combination zp ZP_BYTE:2 [ mul8s_compare::a#7 mul8s_compare::a#1 ] +Uplifting [mul8s_compare] best 293834 combination zp ZP_BYTE:2 [ mul8s_compare::a#7 mul8s_compare::a#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:34 [ mul8u_compare::a#7 mul8u_compare::a#1 ] -Uplifting [mul8u_compare] best 293696 combination zp ZP_BYTE:34 [ mul8u_compare::a#7 mul8u_compare::a#1 ] +Uplifting [mul8u_compare] best 293834 combination zp ZP_BYTE:34 [ mul8u_compare::a#7 mul8u_compare::a#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:49 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] -Uplifting [mulf_init] best 293696 combination zp ZP_BYTE:49 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] +Uplifting [mulf_init] best 293834 combination zp ZP_BYTE:49 [ mulf_init::x_2#3 mulf_init::x_2#2 mulf_init::x_2#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:52 [ mulf_init::x_255#2 mulf_init::x_255#1 ] +Uplifting [mulf_init] best 293714 combination reg byte x [ mulf_init::x_255#2 mulf_init::x_255#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:57 [ mulf_init::dir#2 mulf_init::dir#3 ] -Uplifting [mulf_init] best 293696 combination zp ZP_BYTE:57 [ mulf_init::dir#2 mulf_init::dir#3 ] +Uplifting [mulf_init] best 293714 combination zp ZP_BYTE:57 [ mulf_init::dir#2 mulf_init::dir#3 ] Attempting to uplift remaining variables inzp ZP_BYTE:67 [ mulf8s::b#0 ] -Uplifting [mulf8s] best 293696 combination zp ZP_BYTE:67 [ mulf8s::b#0 ] +Uplifting [mulf8s] best 293714 combination zp ZP_BYTE:67 [ mulf8s::b#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:72 [ mul8s::a#0 ] -Uplifting [mul8s] best 293696 combination zp ZP_BYTE:72 [ mul8s::a#0 ] +Uplifting [mul8s] best 293714 combination zp ZP_BYTE:72 [ mul8s::a#0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:92 [ mul8s::$12 ] +Uplifting [mul8s] best 293708 combination reg byte a [ mul8s::$12 ] +Attempting to uplift remaining variables inzp ZP_BYTE:93 [ mul8s::$17 ] +Uplifting [mul8s] best 293702 combination reg byte a [ mul8s::$17 ] +Attempting to uplift remaining variables inzp ZP_BYTE:100 [ mulf8s::$17 ] +Uplifting [mulf8s] best 293696 combination reg byte a [ mulf8s::$17 ] Attempting to uplift remaining variables inzp ZP_BYTE:79 [ mul8s_error::b#0 ] Uplifting [mul8s_error] best 293696 combination zp ZP_BYTE:79 [ mul8s_error::b#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:118 [ mul8u_error::b#0 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/voronoi.asm b/src/test/java/dk/camelot64/kickc/test/ref/voronoi.asm index ba356738f..243a59b04 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/voronoi.asm +++ b/src/test/java/dk/camelot64/kickc/test/ref/voronoi.asm @@ -32,19 +32,19 @@ animate: { lda #0 sta YPOS+0 b2: - ldx XPOS+1 - dex - stx XPOS+1 - txa + lda XPOS+1 + sec + sbc #1 + sta XPOS+1 cmp #$ff bne b3 lda #$28 sta XPOS+1 b3: - ldx YPOS+2 - inx - stx YPOS+2 - txa + lda YPOS+2 + clc + adc #1 + sta YPOS+2 cmp #$19 bne b4 lda #0 @@ -110,7 +110,6 @@ findcol: { .label y = 2 .label xp = 8 .label yp = 9 - .label diff = 8 .label i = 6 .label mindiff = 7 ldx #0 @@ -137,10 +136,10 @@ findcol: { lda x cmp xp bcs b4 - lda diff + lda xp sec sbc x - sta diff + tay b5: lda y cmp yp @@ -148,8 +147,9 @@ findcol: { lda yp sec sbc y + sty $ff clc - adc diff + adc $ff tay b7: cpy mindiff @@ -173,15 +173,16 @@ findcol: { lda y sec sbc yp + sty $ff clc - adc diff + adc $ff tay jmp b7 b4: lda x sec - sbc diff - sta diff + sbc xp + tay jmp b5 } initscreen: { diff --git a/src/test/java/dk/camelot64/kickc/test/ref/voronoi.log b/src/test/java/dk/camelot64/kickc/test/ref/voronoi.log index c48bd1c49..ccb2911ff 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/voronoi.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/voronoi.log @@ -2572,43 +2572,46 @@ Uplift Scope [animate] 4: zp ZP_BYTE:13 [ animate::$0 ] 4: zp ZP_BYTE:14 [ anima Uplift Scope [main] Uplift Scope [] -Uplifting [findcol] best 1953995 combination reg byte y [ findcol::mindiff#11 findcol::diff#6 findcol::diff#3 findcol::diff#2 findcol::mindiff#15 ] zp ZP_BYTE:9 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 ] reg byte x [ findcol::return#2 findcol::mincol#10 findcol::mincol#2 findcol::mincol#1 ] zp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ] reg byte a [ findcol::$10 ] reg byte a [ findcol::$12 ] zp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ] zp ZP_BYTE:24 [ findcol::xp#0 ] zp ZP_BYTE:25 [ findcol::yp#0 ] zp ZP_BYTE:22 [ findcol::return#0 ] zp ZP_BYTE:21 [ findcol::y#0 ] zp ZP_BYTE:20 [ findcol::x#0 ] -Limited combination testing to 1000 combinations of 2239488 possible. -Uplifting [render] best 1947995 combination zp ZP_BYTE:5 [ render::x#2 render::x#1 ] reg byte a [ render::col#0 ] zp ZP_BYTE:2 [ render::y#4 render::y#1 ] zp ZP_WORD:3 [ render::colline#5 render::colline#1 ] -Uplifting [initscreen] best 1947995 combination zp ZP_WORD:11 [ initscreen::screen#2 initscreen::screen#1 ] -Uplifting [animate] best 1947965 combination reg byte x [ animate::$0 ] reg byte x [ animate::$3 ] reg byte x [ animate::$6 ] reg byte x [ animate::$9 ] reg byte x [ animate::$12 ] zp ZP_BYTE:18 [ animate::$15 ] zp ZP_BYTE:19 [ animate::$18 ] -Limited combination testing to 1000 combinations of 16384 possible. -Uplifting [main] best 1947965 combination -Uplifting [] best 1947965 combination -Attempting to uplift remaining variables inzp ZP_BYTE:9 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 ] -Uplifting [findcol] best 1947965 combination zp ZP_BYTE:9 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 ] +Uplifting [findcol] best 2033995 combination reg byte y [ findcol::mindiff#11 findcol::diff#6 findcol::diff#3 findcol::diff#2 findcol::mindiff#15 ] reg byte y [ findcol::diff#4 findcol::diff#1 findcol::diff#0 ] reg byte x [ findcol::return#2 findcol::mincol#10 findcol::mincol#2 findcol::mincol#1 ] zp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ] zp ZP_BYTE:26 [ findcol::$10 ] zp ZP_BYTE:27 [ findcol::$12 ] zp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ] zp ZP_BYTE:24 [ findcol::xp#0 ] zp ZP_BYTE:25 [ findcol::yp#0 ] zp ZP_BYTE:22 [ findcol::return#0 ] zp ZP_BYTE:21 [ findcol::y#0 ] zp ZP_BYTE:20 [ findcol::x#0 ] +Limited combination testing to 100 combinations of 2239488 possible. +Uplifting [render] best 2027995 combination zp ZP_BYTE:5 [ render::x#2 render::x#1 ] reg byte a [ render::col#0 ] zp ZP_BYTE:2 [ render::y#4 render::y#1 ] zp ZP_WORD:3 [ render::colline#5 render::colline#1 ] +Uplifting [initscreen] best 2027995 combination zp ZP_WORD:11 [ initscreen::screen#2 initscreen::screen#1 ] +Uplifting [animate] best 2027975 combination reg byte x [ animate::$0 ] reg byte x [ animate::$3 ] reg byte a [ animate::$6 ] reg byte a [ animate::$9 ] zp ZP_BYTE:17 [ animate::$12 ] zp ZP_BYTE:18 [ animate::$15 ] zp ZP_BYTE:19 [ animate::$18 ] +Limited combination testing to 100 combinations of 16384 possible. +Uplifting [main] best 2027975 combination +Uplifting [] best 2027975 combination Attempting to uplift remaining variables inzp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ] -Uplifting [findcol] best 1947965 combination zp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ] +Uplifting [findcol] best 2027975 combination zp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ] +Attempting to uplift remaining variables inzp ZP_BYTE:26 [ findcol::$10 ] +Uplifting [findcol] best 2007975 combination reg byte a [ findcol::$10 ] +Attempting to uplift remaining variables inzp ZP_BYTE:27 [ findcol::$12 ] +Uplifting [findcol] best 1987975 combination reg byte a [ findcol::$12 ] Attempting to uplift remaining variables inzp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ] -Uplifting [findcol] best 1947965 combination zp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ] +Uplifting [findcol] best 1987975 combination zp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:24 [ findcol::xp#0 ] -Uplifting [findcol] best 1947965 combination zp ZP_BYTE:24 [ findcol::xp#0 ] +Uplifting [findcol] best 1987975 combination zp ZP_BYTE:24 [ findcol::xp#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:25 [ findcol::yp#0 ] -Uplifting [findcol] best 1947965 combination zp ZP_BYTE:25 [ findcol::yp#0 ] +Uplifting [findcol] best 1987975 combination zp ZP_BYTE:25 [ findcol::yp#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:5 [ render::x#2 render::x#1 ] -Uplifting [render] best 1947965 combination zp ZP_BYTE:5 [ render::x#2 render::x#1 ] +Uplifting [render] best 1987975 combination zp ZP_BYTE:5 [ render::x#2 render::x#1 ] Attempting to uplift remaining variables inzp ZP_BYTE:22 [ findcol::return#0 ] -Uplifting [findcol] best 1943965 combination reg byte a [ findcol::return#0 ] +Uplifting [findcol] best 1983975 combination reg byte a [ findcol::return#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:21 [ findcol::y#0 ] -Uplifting [findcol] best 1943965 combination zp ZP_BYTE:21 [ findcol::y#0 ] +Uplifting [findcol] best 1983975 combination zp ZP_BYTE:21 [ findcol::y#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:20 [ findcol::x#0 ] -Uplifting [findcol] best 1943965 combination zp ZP_BYTE:20 [ findcol::x#0 ] +Uplifting [findcol] best 1983975 combination zp ZP_BYTE:20 [ findcol::x#0 ] Attempting to uplift remaining variables inzp ZP_BYTE:2 [ render::y#4 render::y#1 ] -Uplifting [render] best 1943965 combination zp ZP_BYTE:2 [ render::y#4 render::y#1 ] +Uplifting [render] best 1983975 combination zp ZP_BYTE:2 [ render::y#4 render::y#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:17 [ animate::$12 ] +Uplifting [animate] best 1983969 combination reg byte x [ animate::$12 ] Attempting to uplift remaining variables inzp ZP_BYTE:18 [ animate::$15 ] -Uplifting [animate] best 1943959 combination reg byte a [ animate::$15 ] +Uplifting [animate] best 1983963 combination reg byte a [ animate::$15 ] Attempting to uplift remaining variables inzp ZP_BYTE:19 [ animate::$18 ] -Uplifting [animate] best 1943953 combination reg byte a [ animate::$18 ] -Coalescing zero page register with common assignment [ zp ZP_BYTE:9 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 ] ] with [ zp ZP_BYTE:24 [ findcol::xp#0 ] ] - score: 2 +Uplifting [animate] best 1983957 combination reg byte a [ animate::$18 ] Coalescing zero page register with common assignment [ zp ZP_BYTE:2 [ render::y#4 render::y#1 ] ] with [ zp ZP_BYTE:21 [ findcol::y#0 ] ] - score: 1 Coalescing zero page register with common assignment [ zp ZP_BYTE:5 [ render::x#2 render::x#1 ] ] with [ zp ZP_BYTE:20 [ findcol::x#0 ] ] - score: 1 Coalescing zero page register [ zp ZP_WORD:3 [ render::colline#5 render::colline#1 ] ] with [ zp ZP_WORD:11 [ initscreen::screen#2 initscreen::screen#1 ] ] -Allocated (was zp ZP_BYTE:9) zp ZP_BYTE:8 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 findcol::xp#0 ] +Allocated (was zp ZP_BYTE:24) zp ZP_BYTE:8 [ findcol::xp#0 ] Allocated (was zp ZP_BYTE:25) zp ZP_BYTE:9 [ findcol::yp#0 ] ASSEMBLER BEFORE OPTIMIZATION @@ -2709,11 +2712,12 @@ animate: { jmp b2 //SEG35 animate::@2 b2: - //SEG36 [20] (byte/signed word/word/dword/signed dword~) animate::$6 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) - (byte/signed byte/word/signed word/dword/signed dword) 1 [ animate::$6 ] ( main:2::animate:9 [ animate::$6 ] ) -- vbuxx=_deref_pbuc1_minus_1 - ldx XPOS+1 - dex - //SEG37 [21] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed word/word/dword/signed dword~) animate::$6 [ ] ( main:2::animate:9 [ ] ) -- _deref_pbuc1=vbuxx - stx XPOS+1 + //SEG36 [20] (byte/signed word/word/dword/signed dword~) animate::$6 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) - (byte/signed byte/word/signed word/dword/signed dword) 1 [ animate::$6 ] ( main:2::animate:9 [ animate::$6 ] ) -- vbuaa=_deref_pbuc1_minus_1 + lda XPOS+1 + sec + sbc #1 + //SEG37 [21] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed word/word/dword/signed dword~) animate::$6 [ ] ( main:2::animate:9 [ ] ) -- _deref_pbuc1=vbuaa + sta XPOS+1 //SEG38 [22] if(*((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@3 [ ] ( main:2::animate:9 [ ] ) -- _deref_pbuc1_neq_vbuc2_then_la1 lda XPOS+1 cmp #$ff @@ -2727,11 +2731,12 @@ animate: { jmp b3 //SEG41 animate::@3 b3: - //SEG42 [24] (byte/signed word/word/dword/signed dword~) animate::$9 ← *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ animate::$9 ] ( main:2::animate:9 [ animate::$9 ] ) -- vbuxx=_deref_pbuc1_plus_1 - ldx YPOS+2 - inx - //SEG43 [25] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed word/word/dword/signed dword~) animate::$9 [ ] ( main:2::animate:9 [ ] ) -- _deref_pbuc1=vbuxx - stx YPOS+2 + //SEG42 [24] (byte/signed word/word/dword/signed dword~) animate::$9 ← *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ animate::$9 ] ( main:2::animate:9 [ animate::$9 ] ) -- vbuaa=_deref_pbuc1_plus_1 + lda YPOS+2 + clc + adc #1 + //SEG43 [25] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed word/word/dword/signed dword~) animate::$9 [ ] ( main:2::animate:9 [ ] ) -- _deref_pbuc1=vbuaa + sta YPOS+2 //SEG44 [26] if(*((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@4 [ ] ( main:2::animate:9 [ ] ) -- _deref_pbuc1_neq_vbuc2_then_la1 lda YPOS+2 cmp #$19 @@ -2873,7 +2878,6 @@ findcol: { .label y = 2 .label xp = 8 .label yp = 9 - .label diff = 8 .label i = 6 .label mindiff = 7 //SEG91 [54] phi from findcol to findcol::@1 [phi:findcol->findcol::@1] @@ -2926,11 +2930,11 @@ findcol: { jmp b12 //SEG107 findcol::@12 b12: - //SEG108 [62] (byte) findcol::diff#1 ← (byte) findcol::xp#0 - (byte) findcol::x#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#1 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#1 ] ) -- vbuz1=vbuz1_minus_vbuz2 - lda diff + //SEG108 [62] (byte) findcol::diff#1 ← (byte) findcol::xp#0 - (byte) findcol::x#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#1 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#1 ] ) -- vbuyy=vbuz1_minus_vbuz2 + lda xp sec sbc x - sta diff + tay //SEG109 [63] phi from findcol::@12 findcol::@4 to findcol::@5 [phi:findcol::@12/findcol::@4->findcol::@5] b5_from_b12: b5_from_b4: @@ -2949,9 +2953,10 @@ findcol: { lda yp sec sbc y - //SEG115 [66] (byte) findcol::diff#3 ← (byte) findcol::diff#4 + (byte~) findcol::$10 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#3 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#3 ] ) -- vbuyy=vbuz1_plus_vbuaa + //SEG115 [66] (byte) findcol::diff#3 ← (byte) findcol::diff#4 + (byte~) findcol::$10 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#3 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#3 ] ) -- vbuyy=vbuyy_plus_vbuaa + sty $ff clc - adc diff + adc $ff tay //SEG116 [67] phi from findcol::@14 findcol::@6 to findcol::@7 [phi:findcol::@14/findcol::@6->findcol::@7] b7_from_b14: @@ -3009,18 +3014,19 @@ findcol: { lda y sec sbc yp - //SEG140 [76] (byte) findcol::diff#2 ← (byte) findcol::diff#4 + (byte~) findcol::$12 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#2 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#2 ] ) -- vbuyy=vbuz1_plus_vbuaa + //SEG140 [76] (byte) findcol::diff#2 ← (byte) findcol::diff#4 + (byte~) findcol::$12 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#2 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#2 ] ) -- vbuyy=vbuyy_plus_vbuaa + sty $ff clc - adc diff + adc $ff tay jmp b7_from_b6 //SEG141 findcol::@4 b4: - //SEG142 [77] (byte) findcol::diff#0 ← (byte) findcol::x#0 - (byte) findcol::xp#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#0 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#0 ] ) -- vbuz1=vbuz2_minus_vbuz1 + //SEG142 [77] (byte) findcol::diff#0 ← (byte) findcol::x#0 - (byte) findcol::xp#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#0 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#0 ] ) -- vbuyy=vbuz1_minus_vbuz2 lda x sec - sbc diff - sta diff + sbc xp + tay jmp b5_from_b4 } //SEG143 initscreen @@ -3105,8 +3111,8 @@ Removing instruction jmp breturn Succesful ASM optimization Pass5NextJumpElimination Replacing instruction lda XPOS+0 with TXA Replacing instruction lda YPOS+0 with TXA -Replacing instruction lda XPOS+1 with TXA -Replacing instruction lda YPOS+2 with TXA +Removing instruction lda XPOS+1 +Removing instruction lda YPOS+2 Replacing instruction lda YPOS+3 with TXA Removing instruction lda XPOS+3 Replacing instruction lda #0 with TXA @@ -3198,8 +3204,8 @@ FINAL SYMBOL TABLE (byte/signed word/word/dword/signed dword~) animate::$15 reg byte a 4.0 (byte/signed word/word/dword/signed dword~) animate::$18 reg byte a 4.0 (byte/signed word/word/dword/signed dword~) animate::$3 reg byte x 4.0 -(byte/signed word/word/dword/signed dword~) animate::$6 reg byte x 4.0 -(byte/signed word/word/dword/signed dword~) animate::$9 reg byte x 4.0 +(byte/signed word/word/dword/signed dword~) animate::$6 reg byte a 4.0 +(byte/signed word/word/dword/signed dword~) animate::$9 reg byte a 4.0 (label) animate::@1 (label) animate::@10 (label) animate::@11 @@ -3229,11 +3235,11 @@ FINAL SYMBOL TABLE (label) findcol::@9 (label) findcol::@return (byte) findcol::diff -(byte) findcol::diff#0 diff zp ZP_BYTE:8 20002.0 -(byte) findcol::diff#1 diff zp ZP_BYTE:8 20002.0 +(byte) findcol::diff#0 reg byte y 20002.0 +(byte) findcol::diff#1 reg byte y 20002.0 (byte) findcol::diff#2 reg byte y 20002.0 (byte) findcol::diff#3 reg byte y 20002.0 -(byte) findcol::diff#4 diff zp ZP_BYTE:8 10001.0 +(byte) findcol::diff#4 reg byte y 10001.0 (byte) findcol::diff#6 reg byte y 13334.666666666666 (byte) findcol::i (byte) findcol::i#1 i zp ZP_BYTE:6 10001.0 @@ -3295,24 +3301,25 @@ zp ZP_BYTE:5 [ render::x#2 render::x#1 findcol::x#0 ] zp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ] zp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ] reg byte x [ findcol::return#2 findcol::mincol#10 findcol::mincol#2 findcol::mincol#1 ] -zp ZP_BYTE:8 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 findcol::xp#0 ] +reg byte y [ findcol::diff#4 findcol::diff#1 findcol::diff#0 ] reg byte y [ findcol::mindiff#11 findcol::diff#6 findcol::diff#3 findcol::diff#2 findcol::mindiff#15 ] reg byte x [ animate::$0 ] reg byte x [ animate::$3 ] -reg byte x [ animate::$6 ] -reg byte x [ animate::$9 ] +reg byte a [ animate::$6 ] +reg byte a [ animate::$9 ] reg byte x [ animate::$12 ] reg byte a [ animate::$15 ] reg byte a [ animate::$18 ] reg byte a [ findcol::return#0 ] reg byte a [ render::col#0 ] +zp ZP_BYTE:8 [ findcol::xp#0 ] zp ZP_BYTE:9 [ findcol::yp#0 ] reg byte a [ findcol::$10 ] reg byte a [ findcol::$12 ] FINAL ASSEMBLER -Score: 1648777 +Score: 1688777 //SEG0 Basic Upstart .pc = $801 "Basic" @@ -3384,13 +3391,13 @@ animate: { sta YPOS+0 //SEG35 animate::@2 b2: - //SEG36 [20] (byte/signed word/word/dword/signed dword~) animate::$6 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) - (byte/signed byte/word/signed word/dword/signed dword) 1 [ animate::$6 ] ( main:2::animate:9 [ animate::$6 ] ) -- vbuxx=_deref_pbuc1_minus_1 - ldx XPOS+1 - dex - //SEG37 [21] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed word/word/dword/signed dword~) animate::$6 [ ] ( main:2::animate:9 [ ] ) -- _deref_pbuc1=vbuxx - stx XPOS+1 + //SEG36 [20] (byte/signed word/word/dword/signed dword~) animate::$6 ← *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) - (byte/signed byte/word/signed word/dword/signed dword) 1 [ animate::$6 ] ( main:2::animate:9 [ animate::$6 ] ) -- vbuaa=_deref_pbuc1_minus_1 + lda XPOS+1 + sec + sbc #1 + //SEG37 [21] *((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1) ← (byte/signed word/word/dword/signed dword~) animate::$6 [ ] ( main:2::animate:9 [ ] ) -- _deref_pbuc1=vbuaa + sta XPOS+1 //SEG38 [22] if(*((const byte[]) XPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 1)!=(byte/word/signed word/dword/signed dword) 255) goto animate::@3 [ ] ( main:2::animate:9 [ ] ) -- _deref_pbuc1_neq_vbuc2_then_la1 - txa cmp #$ff bne b3 //SEG39 animate::@9 @@ -3399,13 +3406,13 @@ animate: { sta XPOS+1 //SEG41 animate::@3 b3: - //SEG42 [24] (byte/signed word/word/dword/signed dword~) animate::$9 ← *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ animate::$9 ] ( main:2::animate:9 [ animate::$9 ] ) -- vbuxx=_deref_pbuc1_plus_1 - ldx YPOS+2 - inx - //SEG43 [25] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed word/word/dword/signed dword~) animate::$9 [ ] ( main:2::animate:9 [ ] ) -- _deref_pbuc1=vbuxx - stx YPOS+2 + //SEG42 [24] (byte/signed word/word/dword/signed dword~) animate::$9 ← *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) + (byte/signed byte/word/signed word/dword/signed dword) 1 [ animate::$9 ] ( main:2::animate:9 [ animate::$9 ] ) -- vbuaa=_deref_pbuc1_plus_1 + lda YPOS+2 + clc + adc #1 + //SEG43 [25] *((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2) ← (byte/signed word/word/dword/signed dword~) animate::$9 [ ] ( main:2::animate:9 [ ] ) -- _deref_pbuc1=vbuaa + sta YPOS+2 //SEG44 [26] if(*((const byte[]) YPOS#0+(byte/signed byte/word/signed word/dword/signed dword) 2)!=(byte/signed byte/word/signed word/dword/signed dword) 25) goto animate::@4 [ ] ( main:2::animate:9 [ ] ) -- _deref_pbuc1_neq_vbuc2_then_la1 - txa cmp #$19 bne b4 //SEG45 animate::@10 @@ -3520,7 +3527,6 @@ findcol: { .label y = 2 .label xp = 8 .label yp = 9 - .label diff = 8 .label i = 6 .label mindiff = 7 //SEG91 [54] phi from findcol to findcol::@1 [phi:findcol->findcol::@1] @@ -3564,11 +3570,11 @@ findcol: { cmp xp bcs b4 //SEG107 findcol::@12 - //SEG108 [62] (byte) findcol::diff#1 ← (byte) findcol::xp#0 - (byte) findcol::x#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#1 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#1 ] ) -- vbuz1=vbuz1_minus_vbuz2 - lda diff + //SEG108 [62] (byte) findcol::diff#1 ← (byte) findcol::xp#0 - (byte) findcol::x#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#1 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#1 ] ) -- vbuyy=vbuz1_minus_vbuz2 + lda xp sec sbc x - sta diff + tay //SEG109 [63] phi from findcol::@12 findcol::@4 to findcol::@5 [phi:findcol::@12/findcol::@4->findcol::@5] //SEG110 [63] phi (byte) findcol::diff#4 = (byte) findcol::diff#1 [phi:findcol::@12/findcol::@4->findcol::@5#0] -- register_copy //SEG111 findcol::@5 @@ -3582,9 +3588,10 @@ findcol: { lda yp sec sbc y - //SEG115 [66] (byte) findcol::diff#3 ← (byte) findcol::diff#4 + (byte~) findcol::$10 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#3 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#3 ] ) -- vbuyy=vbuz1_plus_vbuaa + //SEG115 [66] (byte) findcol::diff#3 ← (byte) findcol::diff#4 + (byte~) findcol::$10 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#3 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#3 ] ) -- vbuyy=vbuyy_plus_vbuaa + sty $ff clc - adc diff + adc $ff tay //SEG116 [67] phi from findcol::@14 findcol::@6 to findcol::@7 [phi:findcol::@14/findcol::@6->findcol::@7] //SEG117 [67] phi (byte) findcol::diff#6 = (byte) findcol::diff#3 [phi:findcol::@14/findcol::@6->findcol::@7#0] -- register_copy @@ -3632,18 +3639,19 @@ findcol: { lda y sec sbc yp - //SEG140 [76] (byte) findcol::diff#2 ← (byte) findcol::diff#4 + (byte~) findcol::$12 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#2 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#2 ] ) -- vbuyy=vbuz1_plus_vbuaa + //SEG140 [76] (byte) findcol::diff#2 ← (byte) findcol::diff#4 + (byte~) findcol::$12 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#2 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::diff#2 ] ) -- vbuyy=vbuyy_plus_vbuaa + sty $ff clc - adc diff + adc $ff tay jmp b7 //SEG141 findcol::@4 b4: - //SEG142 [77] (byte) findcol::diff#0 ← (byte) findcol::x#0 - (byte) findcol::xp#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#0 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#0 ] ) -- vbuz1=vbuz2_minus_vbuz1 + //SEG142 [77] (byte) findcol::diff#0 ← (byte) findcol::x#0 - (byte) findcol::xp#0 [ findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#0 ] ( main:2::render:7::findcol:43 [ render::y#4 render::colline#5 render::x#2 findcol::x#0 findcol::y#0 findcol::i#10 findcol::mindiff#10 findcol::mincol#10 findcol::yp#0 findcol::diff#0 ] ) -- vbuyy=vbuz1_minus_vbuz2 lda x sec - sbc diff - sta diff + sbc xp + tay jmp b5 } //SEG143 initscreen diff --git a/src/test/java/dk/camelot64/kickc/test/ref/voronoi.sym b/src/test/java/dk/camelot64/kickc/test/ref/voronoi.sym index 737fd2e2c..efd5a31bd 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/voronoi.sym +++ b/src/test/java/dk/camelot64/kickc/test/ref/voronoi.sym @@ -19,8 +19,8 @@ (byte/signed word/word/dword/signed dword~) animate::$15 reg byte a 4.0 (byte/signed word/word/dword/signed dword~) animate::$18 reg byte a 4.0 (byte/signed word/word/dword/signed dword~) animate::$3 reg byte x 4.0 -(byte/signed word/word/dword/signed dword~) animate::$6 reg byte x 4.0 -(byte/signed word/word/dword/signed dword~) animate::$9 reg byte x 4.0 +(byte/signed word/word/dword/signed dword~) animate::$6 reg byte a 4.0 +(byte/signed word/word/dword/signed dword~) animate::$9 reg byte a 4.0 (label) animate::@1 (label) animate::@10 (label) animate::@11 @@ -50,11 +50,11 @@ (label) findcol::@9 (label) findcol::@return (byte) findcol::diff -(byte) findcol::diff#0 diff zp ZP_BYTE:8 20002.0 -(byte) findcol::diff#1 diff zp ZP_BYTE:8 20002.0 +(byte) findcol::diff#0 reg byte y 20002.0 +(byte) findcol::diff#1 reg byte y 20002.0 (byte) findcol::diff#2 reg byte y 20002.0 (byte) findcol::diff#3 reg byte y 20002.0 -(byte) findcol::diff#4 diff zp ZP_BYTE:8 10001.0 +(byte) findcol::diff#4 reg byte y 10001.0 (byte) findcol::diff#6 reg byte y 13334.666666666666 (byte) findcol::i (byte) findcol::i#1 i zp ZP_BYTE:6 10001.0 @@ -116,17 +116,18 @@ zp ZP_BYTE:5 [ render::x#2 render::x#1 findcol::x#0 ] zp ZP_BYTE:6 [ findcol::i#10 findcol::i#1 ] zp ZP_BYTE:7 [ findcol::mindiff#10 findcol::mindiff#13 ] reg byte x [ findcol::return#2 findcol::mincol#10 findcol::mincol#2 findcol::mincol#1 ] -zp ZP_BYTE:8 [ findcol::diff#4 findcol::diff#1 findcol::diff#0 findcol::xp#0 ] +reg byte y [ findcol::diff#4 findcol::diff#1 findcol::diff#0 ] reg byte y [ findcol::mindiff#11 findcol::diff#6 findcol::diff#3 findcol::diff#2 findcol::mindiff#15 ] reg byte x [ animate::$0 ] reg byte x [ animate::$3 ] -reg byte x [ animate::$6 ] -reg byte x [ animate::$9 ] +reg byte a [ animate::$6 ] +reg byte a [ animate::$9 ] reg byte x [ animate::$12 ] reg byte a [ animate::$15 ] reg byte a [ animate::$18 ] reg byte a [ findcol::return#0 ] reg byte a [ render::col#0 ] +zp ZP_BYTE:8 [ findcol::xp#0 ] zp ZP_BYTE:9 [ findcol::yp#0 ] reg byte a [ findcol::$10 ] reg byte a [ findcol::$12 ] diff --git a/src/test/java/dk/camelot64/kickc/test/ref/zpparammin.log b/src/test/java/dk/camelot64/kickc/test/ref/zpparammin.log index 9dc79c94c..1810bbe21 100644 --- a/src/test/java/dk/camelot64/kickc/test/ref/zpparammin.log +++ b/src/test/java/dk/camelot64/kickc/test/ref/zpparammin.log @@ -809,13 +809,21 @@ Uplift Scope [sum2] 22: zp ZP_BYTE:11 [ sum2::return#0 ] 13: zp ZP_BYTE:10 [ sum Uplift Scope [] Uplifting [main] best 1345 combination zp ZP_BYTE:2 [ main::i#2 main::i#1 ] reg byte a [ main::$2 ] reg byte a [ main::$5 ] -Uplifting [sum] best 1179 combination reg byte a [ sum::return#0 ] reg byte a [ sum::a#0 ] reg byte y [ sum::b#0 ] reg byte x [ sum::c#0 ] reg byte a [ sum::return#1 ] reg byte a [ sum::$0 ] -Limited combination testing to 1000 combinations of 2304 possible. -Uplifting [sum2] best 1013 combination reg byte a [ sum2::return#0 ] reg byte a [ sum2::a#0 ] reg byte y [ sum2::b#0 ] reg byte x [ sum2::c#0 ] reg byte a [ sum2::return#1 ] reg byte a [ sum2::$0 ] -Limited combination testing to 1000 combinations of 2304 possible. -Uplifting [] best 1013 combination +Uplifting [sum] best 1214 combination reg byte a [ sum::return#0 ] reg byte a [ sum::a#0 ] reg byte y [ sum::b#0 ] reg byte x [ sum::c#0 ] zp ZP_BYTE:16 [ sum::return#1 ] zp ZP_BYTE:15 [ sum::$0 ] +Limited combination testing to 100 combinations of 2304 possible. +Uplifting [sum2] best 1083 combination reg byte a [ sum2::return#0 ] reg byte a [ sum2::a#0 ] reg byte y [ sum2::b#0 ] reg byte x [ sum2::c#0 ] zp ZP_BYTE:14 [ sum2::return#1 ] zp ZP_BYTE:13 [ sum2::$0 ] +Limited combination testing to 100 combinations of 2304 possible. +Uplifting [] best 1083 combination Attempting to uplift remaining variables inzp ZP_BYTE:2 [ main::i#2 main::i#1 ] -Uplifting [main] best 1013 combination zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Uplifting [main] best 1083 combination zp ZP_BYTE:2 [ main::i#2 main::i#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:14 [ sum2::return#1 ] +Uplifting [sum2] best 1050 combination reg byte a [ sum2::return#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:16 [ sum::return#1 ] +Uplifting [sum] best 1017 combination reg byte a [ sum::return#1 ] +Attempting to uplift remaining variables inzp ZP_BYTE:13 [ sum2::$0 ] +Uplifting [sum2] best 1015 combination reg byte a [ sum2::$0 ] +Attempting to uplift remaining variables inzp ZP_BYTE:15 [ sum::$0 ] +Uplifting [sum] best 1013 combination reg byte a [ sum::$0 ] ASSEMBLER BEFORE OPTIMIZATION //SEG0 Basic Upstart