From c79c32e3add26ac405d9863c8231655498e26dc7 Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Mon, 22 Apr 2024 22:22:59 +0200 Subject: [PATCH] reduced disassembly line length --- debugger.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 3cac428..857c02a 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -499,27 +499,13 @@ int disassemble(cpu *const c, console *const cnsl, const uint16_t pc, const bool work_values.c_str() ); else - result = format("R0: %s, R1: %s, R2: %s, R3: %s, R4: %s, R5: %s, SP: %s, PC: %06o, PSW: %s (%s), instr: %s: %s - MMR0/1/2/3: %s/%s/%s/%s", + result = format("R0: %s, R1: %s, R2: %s, R3: %s, R4: %s, R5: %s, SP: %s, PC: %06o, PSW: %s (%s), instr: %s: %s", registers[0].c_str(), registers[1].c_str(), registers[2].c_str(), registers[3].c_str(), registers[4].c_str(), registers[5].c_str(), registers[6].c_str(), pc, psw.c_str(), data["psw-value"][0].c_str(), instruction_values.c_str(), - instruction.c_str(), - MMR0.c_str(), MMR1.c_str(), MMR2.c_str(), MMR3.c_str() + instruction.c_str() ); -#if defined(COMPARE_OUTPUT) - { - std::string temp = format("R0: %s, R1: %s, R2: %s, R3: %s, R4: %s, R5: %s, SP: %s, PC: %06o, PSW: %s, instr: %s", - registers[0].c_str(), registers[1].c_str(), registers[2].c_str(), registers[3].c_str(), registers[4].c_str(), registers[5].c_str(), registers[6].c_str(), pc, - psw.c_str(), - data["instruction-values"][0].c_str() - ); - - FILE *fh = fopen("compare.dat", "a+"); - fprintf(fh, "%s\n", temp.c_str()); - fclose(fh); - } -#endif if (cnsl) cnsl->debug(result); @@ -530,7 +516,7 @@ int disassemble(cpu *const c, console *const cnsl, const uint16_t pc, const bool for(auto sp_val : data["sp"]) sp += (sp.empty() ? "" : ",") + sp_val; - DOLOG(debug, false, "SP: %s", sp.c_str()); + DOLOG(debug, false, "SP: %s, MMR0/1/2/3: %s/%s/%s/%s", sp.c_str(), MMR0.c_str(), MMR1.c_str(), MMR2.c_str(), MMR3.c_str()); #if 0 if (c->getPSW_runmode() == 3) {