mc68hc11: added TXS, TYS, TSX, TSY

This commit is contained in:
Angelo Salese 2009-06-19 14:54:40 +00:00
parent 2fdf957bd5
commit e3fab21720
2 changed files with 31 additions and 0 deletions

View File

@ -2202,6 +2202,33 @@ static void HC11OP(tst_indy)(hc11_state *cpustate)
CYCLES(cpustate, 6);
}
/* TSX 0x30 */
static void HC11OP(tsx)(hc11_state *cpustate)
{
cpustate->ix = cpustate->sp + 1;
CYCLES(cpustate, 3);
}
/* TSY 0x18 0x30 */
static void HC11OP(tsy)(hc11_state *cpustate)
{
cpustate->iy = cpustate->sp + 1;
CYCLES(cpustate, 4);
}
/* TXS 0x35 */
static void HC11OP(txs)(hc11_state *cpustate)
{
cpustate->sp = cpustate->ix - 1;
CYCLES(cpustate, 3);
}
/* TYS 0x18 0x35 */
static void HC11OP(tys)(hc11_state *cpustate)
{
cpustate->sp = cpustate->iy - 1;
CYCLES(cpustate, 4);
}
/* XGDX 0x8F */
static void HC11OP(xgdx)(hc11_state *cpustate)

View File

@ -187,6 +187,10 @@ static const hc11_opcode_list_struct hc11_opcode_list[] =
{ 0, 0x7d, HC11OP(tst_ext) },
{ 0, 0x6d, HC11OP(tst_indx) },
{ 0x18, 0x6d, HC11OP(tst_indy) },
{ 0, 0x30, HC11OP(tsx) },
{ 0x18, 0x30, HC11OP(tsy) },
{ 0, 0x35, HC11OP(txs) },
{ 0x18, 0x35, HC11OP(tys) },
{ 0, 0x8f, HC11OP(xgdx) },
{ 0x18, 0x8f, HC11OP(xgdy) },