all repos — mgba @ 076855deb184cee21c75b691acc7a1d35fdc744a

mGBA Game Boy Advance Emulator

LR35902: Print address when disassembling
Jeffrey Pfau jeffrey@endrift.com
Thu, 05 Jan 2017 01:03:26 -0800
commit

076855deb184cee21c75b691acc7a1d35fdc744a

parent

c621677a6a8961b24dc16f318248c2e9248ca29e

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/lr35902/debugger/cli-debugger.csrc/lr35902/debugger/cli-debugger.c

@@ -57,6 +57,10 @@ struct CLIDebuggerBackend* be = debugger->backend;

struct LR35902InstructionInfo info = {}; char disassembly[48]; char* disPtr = disassembly; + if (segment >= 0) { + be->printf(be, "%02X: ", segment); + } + be->printf(be, "%04X: ", address); uint8_t instruction; size_t bytesRemaining = 1; for (bytesRemaining = 1; bytesRemaining; --bytesRemaining) {