summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/emu/cpu/hmcs40/hmcs40.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/emu/cpu/hmcs40/hmcs40.c b/src/emu/cpu/hmcs40/hmcs40.c
index 005a7c03b83..1adef6ea242 100644
--- a/src/emu/cpu/hmcs40/hmcs40.c
+++ b/src/emu/cpu/hmcs40/hmcs40.c
@@ -557,18 +557,18 @@ void hmcs40_cpu_device::execute_run()
if ((m_prev_op & 0x3e0) == 0x340)
m_pc = ((m_page << 6) | (m_pc & 0x3f)) & m_pcmask;
+ // remember previous state
+ m_prev_op = m_op;
+ m_prev_pc = m_pc;
+
// check/handle interrupt, but not in the middle of a long jump
- if (m_ie && (m_iri || m_irt) && (m_op & 0x3e0) != 0x340)
+ if (m_ie && (m_iri || m_irt) && (m_prev_op & 0x3e0) != 0x340)
{
do_interrupt();
if (m_icount <= 0)
break;
}
- // remember previous state
- m_prev_op = m_op;
- m_prev_pc = m_pc;
-
// fetch next opcode
debugger_instruction_hook(this, m_pc);
m_icount--;