summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar mamehaze <mamehaze@users.noreply.github.com>2014-12-05 17:21:39 +0000
committerGravatarGravatar mamehaze <mamehaze@users.noreply.github.com>2014-12-05 17:21:39 +0000
commit3c6d54b1bb04d08a0a12d8b77a8c3b44c0caa3a2 (patch) (github)
tree6a0af484ba176357ef4c9dc9f5965776b96b37d1
parent39e127e9b2965780ff804abe53e4ccd16a6ae8e1 (diff)
downloadmame-3c6d54b1bb04d08a0a12d8b77a8c3b44c0caa3a2.tar.bz2
mame-3c6d54b1bb04d08a0a12d8b77a8c3b44c0caa3a2.zip
arcompact: dasm of push/pop instructions show we're on the right track, you can see the start/end of functions in the code (nw)
-rw-r--r--src/emu/cpu/arcompact/arcompactdasm.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/src/emu/cpu/arcompact/arcompactdasm.c b/src/emu/cpu/arcompact/arcompactdasm.c
index 0ac5c57a220..e3191ca2f53 100644
--- a/src/emu/cpu/arcompact/arcompactdasm.c
+++ b/src/emu/cpu/arcompact/arcompactdasm.c
@@ -120,6 +120,20 @@ static const char *table01_01_0x[0x10] =
/* 0f */ "<BBIT1>"
};
+static const char *table18[0x8] =
+{
+ /* 00 */ "LD_S (SP)",
+ /* 01 */ "LDB_S (SP)",
+ /* 02 */ "ST_S (SP)",
+ /* 03 */ "STB_S (SP)",
+ /* 04 */ "ADD_S (SP)",
+ /* 05 */ "ADD_S/SUB_S (SP)",
+ /* 06 */ "POP_S (SP)",
+ /* 07 */ "PUSH_S (SP)",
+
+};
+
+
#define ARCOMPACT_OPERATION ((op & 0xf800) >> 11)
@@ -233,9 +247,25 @@ CPU_DISASSEMBLE(arcompact)
}
else
- {
+ {
size = 2;
- print("%s (%04x)", basic[instruction], op & ~0xf800 );
+
+ switch (instruction)
+ {
+ case 0x18:
+ {
+ // Stack Pointer Based Instructions (16-bit)
+ // 11000 bbb iii uuuuu
+ UINT8 subinstr = (op & 0x00e0) >> 5;
+ print("%s (%04x)", table18[subinstr], op & ~0xf8e0);
+ break;
+
+ }
+
+ default:
+ print("%s (%04x)", basic[instruction], op & ~0xf800);
+ break;
+ }
}