diff options
| -rw-r--r-- | nandgame/cpp/simpc_ui.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/nandgame/cpp/simpc_ui.cpp b/nandgame/cpp/simpc_ui.cpp index e4b3bf8..abe1fa8 100644 --- a/nandgame/cpp/simpc_ui.cpp +++ b/nandgame/cpp/simpc_ui.cpp @@ -22,7 +22,7 @@ #define PRINT_ME(y, x, ...) \ { \ - printf("%*c", x, ' '); \ + printf("%*c", x, ' '); \ printf(__VA_ARGS__); \ printf("\n"); \ } @@ -64,16 +64,18 @@ void simpc_ui_write(const std::unique_ptr<Vcomputer> &topp, uint64_t &i, "A: 0x%04X\tD: 0x%04X\tM: 0x%04X\tRES: 0x%04X", topp->computer->reg_A_int, topp->computer->reg_D_int, topp->computer->reg_pA_int, topp->computer->result_int); - PRINT_ME(6 + NCUR_OFFSET, NCUR_X, - "%9d\t%9d\t%9d\t%11d", - topp->computer->reg_A_int, topp->computer->reg_D_int, - topp->computer->reg_pA_int, topp->computer->result_int); + PRINT_ME( + 6 + NCUR_OFFSET, NCUR_X, "%c%8d\t%c%8d\t%c%8d\t%11d", + topp->computer->store_to_A_int ? '*' : ' ', topp->computer->reg_A_int, + topp->computer->store_to_D_int ? '*' : ' ', topp->computer->reg_D_int, + topp->computer->store_to_pA_int ? '*' : ' ', topp->computer->reg_pA_int, + topp->computer->result_int); PRINT_ME(7 + NCUR_OFFSET, NCUR_X, "ALU"); PRINT_ME(8 + NCUR_OFFSET, NCUR_X, "X: %5d\tY: %5d", topp->computer->CPU->my_alu->int_op_x, topp->computer->CPU->my_alu->int_op_y); - PRINT_ME(getmaxy(stdscr) - 1, 1, "q - Quit; p - (Un)pause; any key in pause - step"); - + PRINT_ME(getmaxy(stdscr) - 1, 1, + "q - Quit; p - (Un)pause; any key in pause - step"); PRINT_NEXT(); |
