mirror of
https://github.com/reactos/reactos.git
synced 2024-09-08 19:59:49 +00:00
[SOFT386]
Implement external stack modification. [NTVDM] Implement EmulatorSetStack for NEW_EMULATOR. svn path=/branches/ntvdm/; revision=60257
This commit is contained in:
parent
34157419d7
commit
7328873681
|
@ -341,6 +341,10 @@ VOID
|
|||
NTAPI
|
||||
Soft386ExecuteAt(PSOFT386_STATE State, USHORT Segment, ULONG Offset);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
Soft386SetStack(PSOFT386_STATE State, USHORT Segment, ULONG Offset);
|
||||
|
||||
#endif // _SOFT386_H_
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -270,4 +270,20 @@ Soft386ExecuteAt(PSOFT386_STATE State, USHORT Segment, ULONG Offset)
|
|||
State->InstPtr.Long = Offset;
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
Soft386SetStack(PSOFT386_STATE State, USHORT Segment, ULONG Offset)
|
||||
{
|
||||
/* Load the new SS */
|
||||
if (!Soft386LoadSegment(State, SOFT386_REG_SS, Segment))
|
||||
{
|
||||
/* An exception occurred, let the handler execute instead */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Set the new SP */
|
||||
State->GeneralRegs[SOFT386_REG_ESP].Long = Offset;
|
||||
}
|
||||
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -429,7 +429,7 @@ VOID EmulatorSetStack(WORD Segment, DWORD Offset)
|
|||
/* Call the softx86 API */
|
||||
softx86_set_stack_ptr(&EmulatorContext, Segment, Offset);
|
||||
#else
|
||||
// TODO: NOT IMPLEMENTED
|
||||
Soft386SetStack(&EmulatorContext, Segment, Offset);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue