Author: aandrejevic
Date: Sat Nov 30 23:45:59 2013
New Revision: 61160
URL: http://svn.reactos.org/svn/reactos?rev=61160&view=rev
Log:
[FAST486]
Revert r61158, and fix the prefix issue correctly, but resetting the flags
again after the call to Fast486InterruptInternal.
Modified:
branches/ntvdm/lib/fast486/fast486.c
Modified: branches/ntvdm/lib/fast486/fast486.c
URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/fast486.c?rev…
==============================================================================
--- branches/ntvdm/lib/fast486/fast486.c [iso-8859-1] (original)
+++ branches/ntvdm/lib/fast486/fast486.c [iso-8859-1] Sat Nov 30 23:45:59 2013
@@ -84,6 +84,9 @@
continue;
}
+ /* A non-prefix opcode has been executed, reset the prefix flags */
+ State->PrefixFlags = 0;
+
/*
* Check if there is an interrupt to execute, or a hardware interrupt signal
* while interrupts are enabled.
@@ -100,6 +103,9 @@
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 */
@@ -115,9 +121,6 @@
/* Set the interrupt status to execute on the next instruction */
State->IntStatus = FAST486_INT_EXECUTE;
}
-
- /* A non-prefix opcode has been executed, reset the prefix flags */
- State->PrefixFlags = 0;
}
while ((Command == FAST486_CONTINUE)
|| (Command == FAST486_STEP_OVER && ProcedureCallCount > 0)
Author: aandrejevic
Date: Sat Nov 30 22:17:18 2013
New Revision: 61158
URL: http://svn.reactos.org/svn/reactos?rev=61158&view=rev
Log:
[FAST486]
Move the prefix reset below the interrupt check, because Fast486InterruptInternal
might set OPSIZE in some circumstances.
Modified:
branches/ntvdm/lib/fast486/fast486.c
Modified: branches/ntvdm/lib/fast486/fast486.c
URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/fast486.c?rev…
==============================================================================
--- branches/ntvdm/lib/fast486/fast486.c [iso-8859-1] (original)
+++ branches/ntvdm/lib/fast486/fast486.c [iso-8859-1] Sat Nov 30 22:17:18 2013
@@ -58,7 +58,12 @@
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.
@@ -78,9 +83,6 @@
/* This is a prefix, go to the next instruction immediately */
continue;
}
-
- /* A non-prefix opcode has been executed, reset the prefix flags */
- State->PrefixFlags = 0;
/*
* Check if there is an interrupt to execute, or a hardware interrupt signal
@@ -113,6 +115,9 @@
/* Set the interrupt status to execute on the next instruction */
State->IntStatus = FAST486_INT_EXECUTE;
}
+
+ /* A non-prefix opcode has been executed, reset the prefix flags */
+ State->PrefixFlags = 0;
}
while ((Command == FAST486_CONTINUE)
|| (Command == FAST486_STEP_OVER && ProcedureCallCount > 0)