summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/ucom4/ucom4.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/cpu/ucom4/ucom4.c')
-rw-r--r--src/emu/cpu/ucom4/ucom4.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/emu/cpu/ucom4/ucom4.c b/src/emu/cpu/ucom4/ucom4.c
index 525b068e5a5..8c30de7de3f 100644
--- a/src/emu/cpu/ucom4/ucom4.c
+++ b/src/emu/cpu/ucom4/ucom4.c
@@ -190,7 +190,6 @@ void ucom4_cpu_device::device_reset()
m_inte_f = 1;
m_pc = 0;
m_op = 0;
- m_prev_op = m_op;
m_skip = false;
// clear i/o
@@ -204,13 +203,13 @@ void ucom4_cpu_device::device_reset()
// execute
//-------------------------------------------------
-void ucom4_cpu_device::increment_pc()
+inline void ucom4_cpu_device::increment_pc()
{
// upper bits (field register) don't auto-increment
m_pc = (m_pc & ~0xff) | ((m_pc + 1) & 0xff);
}
-void ucom4_cpu_device::fetch_arg()
+inline void ucom4_cpu_device::fetch_arg()
{
// 2-byte opcodes: STM/LDI/CLI/CI, JMP/CAL, OCD
if ((m_op & 0xfc) == 0x14 || (m_op & 0xf0) == 0xa0 || m_op == 0x1e)
@@ -227,6 +226,9 @@ void ucom4_cpu_device::execute_run()
{
m_icount--;
+ // remember previous opcode
+ m_prev_op = m_op;
+
debugger_instruction_hook(this, m_pc);
m_op = m_program->read_byte(m_pc);
m_bitmask = 1 << (m_op & 0x03);
@@ -236,7 +238,7 @@ void ucom4_cpu_device::execute_run()
if (m_skip)
{
m_skip = false;
- continue;
+ m_op = 0; // nop
}
switch (m_op & 0xf0)
@@ -337,8 +339,5 @@ void ucom4_cpu_device::execute_run()
break; // 0xff
} // big switch
-
- // remember previous opcode
- m_prev_op = m_op;
}
}