if (State->PrefixFlags == 0) State->SavedInstPtr = State->InstPtr;
/* Perform an instruction fetch */
- if (!Fast486FetchByte(State, &Opcode)) continue;
+ if (!Fast486FetchByte(State, &Opcode))
+ {
+ /* Exception occurred */
+ State->PrefixFlags = 0;
+ continue;
+ }
// TODO: Check for CALL/RET to update ProcedureCallCount.
IdtEntry.Selector,
MAKELONG(IdtEntry.Offset, IdtEntry.OffsetHigh),
IdtEntry.Type);
+
+ /* Restore the prefix flags, which would be set to OPSIZE for 32-bit real mode */
+ State->PrefixFlags = 0;
}
/* Clear the interrupt status */