LR35902: Print address when disassembling

This commit is contained in:
Jeffrey Pfau 2017-01-05 01:03:26 -08:00
parent c621677a6a
commit 076855deb1
1 changed files with 4 additions and 0 deletions

View File

@ -57,6 +57,10 @@ static inline uint16_t _printLine(struct CLIDebugger* debugger, uint16_t address
struct LR35902InstructionInfo info = {}; struct LR35902InstructionInfo info = {};
char disassembly[48]; char disassembly[48];
char* disPtr = disassembly; char* disPtr = disassembly;
if (segment >= 0) {
be->printf(be, "%02X: ", segment);
}
be->printf(be, "%04X: ", address);
uint8_t instruction; uint8_t instruction;
size_t bytesRemaining = 1; size_t bytesRemaining = 1;
for (bytesRemaining = 1; bytesRemaining; --bytesRemaining) { for (bytesRemaining = 1; bytesRemaining; --bytesRemaining) {