From 5201cfdc87456d60a9184360b2c8b868420c2a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Kujawa?= Date: Fri, 20 Jan 2017 09:46:33 +0100 Subject: [PATCH] Print operand hex vals during disassembly. --- src/instruction.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/instruction.c b/src/instruction.c index a54320e..6c492c6 100644 --- a/src/instruction.c +++ b/src/instruction.c @@ -123,7 +123,14 @@ disassemble(bus_t *b, uint16_t addr) printf("%X:\t", addr); instruction_print(&i); - printf("\t\t// %X", id.opcode); + printf("\t\t// "); + + if (id.size == 1) + printf("%X", id.opcode); + else if (id.size == 2) + printf("%X %X", id.opcode, i.op1); + else if (id.size == 3) + printf("%X %X %X", id.opcode, i.op1, i.op2); printf("\n"); }