diff --git a/Intel8080/src/Intel8080.cpp b/Intel8080/src/Intel8080.cpp index f730ac6..3aa319c 100644 --- a/Intel8080/src/Intel8080.cpp +++ b/Intel8080/src/Intel8080.cpp @@ -266,15 +266,14 @@ int EightBit::Intel8080::step() { ExecutingInstruction.fire(*this); resetCycles(); if (LIKELY(powered())) { - uint8_t instruction; - if (UNLIKELY(INT() && m_interruptEnable)) { + if (UNLIKELY(INT())) { INT() = false; - di(); - instruction = BUS().DATA(); - } else { - instruction = fetchByte(); + if (m_interruptEnable) { + di(); + return execute(BUS().DATA()); + } } - return execute(instruction); + return execute(fetchByte()); } return cycles(); }