From 20ad720def253699a843f7c7a89be8a262622d5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 17 Jan 2018 14:49:40 +0100 Subject: Print I instruction immediate field in hexa --- qtmips_machine/instruction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtmips_machine/instruction.cpp b/qtmips_machine/instruction.cpp index 7ff35fe..c34ff3a 100644 --- a/qtmips_machine/instruction.cpp +++ b/qtmips_machine/instruction.cpp @@ -239,7 +239,7 @@ QString Instruction::to_str() const { switch (im.type) { case IT_I: res += im.name; - res += " $" + QString::number(rs()) + ", $" + QString::number(rt()) + ", " + QString::number(immediate()); + res += " $" + QString::number(rs()) + ", $" + QString::number(rt()) + ", 0x" + QString::number(immediate(), 16); break; case IT_J: res += im.name; -- cgit v1.2.3