mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
[NTVDM]: Use SEG_OFF_TO_PTR ( $+ \epsilon * code _eorganization$ ).
svn path=/branches/ntvdm/; revision=60776
This commit is contained in:
parent
720ab73ec3
commit
d35b972d75
1 changed files with 6 additions and 6 deletions
|
@ -236,7 +236,7 @@ static VOID WINAPI EmulatorBiosOperation(PFAST486_STATE State, USHORT BopCode)
|
|||
StackPointer = State->GeneralRegs[FAST486_REG_ESP].LowWord;
|
||||
|
||||
/* Get the stack */
|
||||
Stack = (LPWORD)((ULONG_PTR)BaseAddress + TO_LINEAR(StackSegment, StackPointer));
|
||||
Stack = (LPWORD)SEG_OFF_TO_PTR(StackSegment, StackPointer);
|
||||
|
||||
if (BopCode == EMULATOR_INT_BOP)
|
||||
{
|
||||
|
@ -400,11 +400,6 @@ ULONG EmulatorGetRegister(ULONG Register)
|
|||
}
|
||||
}
|
||||
|
||||
ULONG EmulatorGetProgramCounter(VOID)
|
||||
{
|
||||
return EmulatorContext.InstPtr.Long;
|
||||
}
|
||||
|
||||
VOID EmulatorSetRegister(ULONG Register, ULONG Value)
|
||||
{
|
||||
if (Register < EMULATOR_REG_ES)
|
||||
|
@ -417,6 +412,11 @@ VOID EmulatorSetRegister(ULONG Register, ULONG Value)
|
|||
}
|
||||
}
|
||||
|
||||
ULONG EmulatorGetProgramCounter(VOID)
|
||||
{
|
||||
return EmulatorContext.InstPtr.Long;
|
||||
}
|
||||
|
||||
BOOLEAN EmulatorGetFlag(ULONG Flag)
|
||||
{
|
||||
return (EmulatorContext.Flags.Long & Flag) ? TRUE : FALSE;
|
||||
|
|
Loading…
Reference in a new issue