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)

This commit is contained in:
mamehaze 2014-12-05 17:21:39 +00:00
parent 39e127e9b2
commit 3c6d54b1bb

View File

@ -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)
@ -235,7 +249,23 @@ CPU_DISASSEMBLE(arcompact)
else
{
size = 2;
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;
}
}