From ffa35e5619d42a38861ca8cbaf956396c65041ad Mon Sep 17 00:00:00 2001 From: Joakim Eriksson Date: Wed, 10 Oct 2012 12:08:02 +0200 Subject: [PATCH] fixe disassembly of PUSH/POPM instr --- se/sics/mspsim/core/DisAsm.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/se/sics/mspsim/core/DisAsm.java b/se/sics/mspsim/core/DisAsm.java index dda6689..b05e649 100644 --- a/se/sics/mspsim/core/DisAsm.java +++ b/se/sics/mspsim/core/DisAsm.java @@ -249,16 +249,16 @@ public class DisAsm implements MSP430Constants { default: switch (instruction & 0xff00) { case PUSHM_A: - opstr = "PUSHM.A #" + ((instruction >> 4) & 0x0f) + ", R" + (instruction & 0x0f); + opstr = "PUSHM.A #" + (1 + ((instruction >> 4) & 0x0f)) + ", R" + (instruction & 0x0f); break; case PUSHM_W: - opstr = "PUSHM.W #" + ((instruction >> 4) & 0x0f) + ", R" + (instruction & 0x0f); + opstr = "PUSHM.W #" + (1 + ((instruction >> 4) & 0x0f)) + ", R" + (instruction & 0x0f); break; case POPM_A: - opstr = "POPM.A #" + ((instruction >> 4) & 0x0f) + ", R" + (instruction & 0x0f); + opstr = "POPM.A #" + (1 + ((instruction >> 4) & 0x0f)) + ", R" + (instruction & 0x0f); break; case POPM_W: - opstr = "POPM.W #" + ((instruction >> 4) & 0x0f) + ", R" + (instruction & 0x0f); + opstr = "POPM.W #" + (1 + ((instruction >> 4) & 0x0f)) + ", R" + (instruction & 0x0f); break; } }