From 13eb76ff7e706527996d408ec7658d53e76af77d Mon Sep 17 00:00:00 2001 From: Joakim Eriksson Date: Thu, 4 Oct 2012 19:53:30 +0200 Subject: [PATCH] implemented CALLA_REG instruction --- se/sics/mspsim/core/MSP430Core.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/se/sics/mspsim/core/MSP430Core.java b/se/sics/mspsim/core/MSP430Core.java index 76a03ef..b0c2c86 100644 --- a/se/sics/mspsim/core/MSP430Core.java +++ b/se/sics/mspsim/core/MSP430Core.java @@ -1322,6 +1322,11 @@ public class MSP430Core extends Chip implements MSP430Constants { /* do not update status after these instructions!!! */ updateStatus = false; switch(op) { + case CALLA_REG: + dst = readRegister(dstRegister); + System.out.println("CALLA REG => " + Utils.hex20(dst)); + cycles += 5; + break; case CALLA_IMM: dst = (dstRegister << 16) | currentSegment.read(pc, AccessMode.WORD, AccessType.READ); pc += 2; @@ -1372,7 +1377,6 @@ public class MSP430Core extends Chip implements MSP430Constants { regNo = instruction & 0x0f; // System.out.println("POPM W " + (type == AccessMode.WORD20 ? "A" : "W") + " n: " + // n + " " + regNo + " at " + Utils.hex16(pcBefore)); - /* read and increase stack pointer n times */ for(int i = 0; i < n; i++) { cycles += 2;