implemented CALLA_REG instruction

This commit is contained in:
Joakim Eriksson 2012-10-04 19:53:30 +02:00
parent 46695715b6
commit 13eb76ff7e
1 changed files with 5 additions and 1 deletions

View File

@ -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;