diff options
| author | uvok | 2026-01-26 20:33:53 +0100 |
|---|---|---|
| committer | uvok | 2026-01-26 20:33:53 +0100 |
| commit | 067f2c20c7106d6b843d6411a9e8e8de360ecb78 (patch) | |
| tree | 96afab4a36bf1d1886bc2d805324e3c89c45ee03 /eater_cpu | |
| parent | 96131daa7f5a7aeb022f3d042d35fadaaadd347e (diff) | |
eater: display both M and P pointers
Diffstat (limited to 'eater_cpu')
| -rw-r--r-- | eater_cpu/cpp/simpc_curses.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/eater_cpu/cpp/simpc_curses.cpp b/eater_cpu/cpp/simpc_curses.cpp index 0fb29c8..24533e7 100644 --- a/eater_cpu/cpp/simpc_curses.cpp +++ b/eater_cpu/cpp/simpc_curses.cpp @@ -103,12 +103,12 @@ void simpc_ui_write(const std::unique_ptr<Veater_computer> &topp, uint64_t i) { topp->eater_computer->flags.__PVT__flags_in ? flag_on : flag_off); PRINT_ME_W(clock_regs, flagstart + 2, 1, "%c InsO | %c RAO | %c AlO | %c Sub | %c OI", - topp->eater_computer->flags.__PVT__INS_out ? flag_on : flag_off, - topp->eater_computer->flags.__PVT__RAM_out ? flag_on : flag_off, - topp->eater_computer->flags.__PVT__ALU_out ? flag_on : flag_off, + topp->eater_computer->flags.__PVT__INS_out ? flag_on : flag_off, + topp->eater_computer->flags.__PVT__RAM_out ? flag_on : flag_off, + topp->eater_computer->flags.__PVT__ALU_out ? flag_on : flag_off, topp->eater_computer->flags.__PVT__ALU_subtract_nadd ? flag_on : flag_off, - topp->eater_computer->flags.__PVT__OUT_in ? flag_on : flag_off); + topp->eater_computer->flags.__PVT__OUT_in ? flag_on : flag_off); // PRINT_ME_W( // clock_regs, flagstart, 1, // "| %c | %c | %c %c | %c %c | %c %c | %c %c | %c %c | %c | %c %c %c |", @@ -139,7 +139,18 @@ void simpc_ui_write(const std::unique_ptr<Veater_computer> &topp, uint64_t i) { const int ypos_base = 1; const int adr_factored = adr % 8; const int xpos_base = adr < 8 ? 1 : 21; - const char *prefix = adr == topp->eater_computer->MAR_out ? "> " : " "; + const bool is_m = adr == topp->eater_computer->MAR_out; + const bool is_p = adr == topp->eater_computer->PC_out; + const char *prefix; + if (is_m && is_p) + prefix = "MP> "; + else if (is_m) + prefix = "M > "; + else if (is_p) + prefix = " P> "; + else + prefix = " "; + { const uint16_t program_op_code = topp->eater_computer->RAM->r_datastore[adr]; |
