mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 23:56:11 +00:00
[SOFT386]
Implement Soft386Interrupt. [NTVDM] Implement EmulatorInterrupt and EmulatorExternalInterrupt for NEW_EMULATOR. svn path=/branches/ntvdm/; revision=60628
This commit is contained in:
parent
a2e0e03ee6
commit
c425bbc689
3 changed files with 27 additions and 8 deletions
|
@ -359,7 +359,7 @@ Soft386Reset(PSOFT386_STATE State);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
Soft386Interrupt(PSOFT386_STATE State, UCHAR Number);
|
Soft386Interrupt(PSOFT386_STATE State, UCHAR Number, BOOLEAN Hardware);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
|
|
|
@ -273,10 +273,27 @@ Soft386Reset(PSOFT386_STATE State)
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
Soft386Interrupt(PSOFT386_STATE State, UCHAR Number)
|
Soft386Interrupt(PSOFT386_STATE State, UCHAR Number, BOOLEAN Hardware)
|
||||||
{
|
{
|
||||||
// TODO: NOT IMPLEMENTED!!!
|
SOFT386_IDT_ENTRY IdtEntry;
|
||||||
UNIMPLEMENTED;
|
|
||||||
|
if (Hardware)
|
||||||
|
{
|
||||||
|
/* Set the hardware interrupt flag */
|
||||||
|
State->HardwareInt = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Soft386GetIntVector(State, Number, &IdtEntry))
|
||||||
|
{
|
||||||
|
/* An exception occurred, let the handler execute */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Perform the interrupt */
|
||||||
|
Soft386InterruptInternal(State,
|
||||||
|
IdtEntry.Selector,
|
||||||
|
MAKELONG(IdtEntry.Offset, IdtEntry.OffsetHigh),
|
||||||
|
IdtEntry.Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
|
|
|
@ -461,6 +461,7 @@ VOID EmulatorExecute(WORD Segment, WORD Offset)
|
||||||
|
|
||||||
VOID EmulatorInterrupt(BYTE Number)
|
VOID EmulatorInterrupt(BYTE Number)
|
||||||
{
|
{
|
||||||
|
#ifndef NEW_EMULATOR
|
||||||
LPDWORD IntVecTable = (LPDWORD)((ULONG_PTR)BaseAddress);
|
LPDWORD IntVecTable = (LPDWORD)((ULONG_PTR)BaseAddress);
|
||||||
UINT Segment, Offset;
|
UINT Segment, Offset;
|
||||||
|
|
||||||
|
@ -468,13 +469,11 @@ VOID EmulatorInterrupt(BYTE Number)
|
||||||
Segment = HIWORD(IntVecTable[Number]);
|
Segment = HIWORD(IntVecTable[Number]);
|
||||||
Offset = LOWORD(IntVecTable[Number]);
|
Offset = LOWORD(IntVecTable[Number]);
|
||||||
|
|
||||||
#ifndef NEW_EMULATOR
|
|
||||||
/* Call the softx86 API */
|
/* Call the softx86 API */
|
||||||
softx86_make_simple_interrupt_call(&EmulatorContext, &Segment, &Offset);
|
softx86_make_simple_interrupt_call(&EmulatorContext, &Segment, &Offset);
|
||||||
#else
|
#else
|
||||||
UNREFERENCED_PARAMETER(Segment);
|
/* Call the Soft386 API */
|
||||||
UNREFERENCED_PARAMETER(Offset);
|
Soft386Interrupt(&EmulatorContext, Number, FALSE);
|
||||||
// TODO: NOT IMPLEMENTED
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,6 +482,9 @@ VOID EmulatorExternalInterrupt(BYTE Number)
|
||||||
#ifndef NEW_EMULATOR
|
#ifndef NEW_EMULATOR
|
||||||
/* Call the softx86 API */
|
/* Call the softx86 API */
|
||||||
softx86_ext_hw_signal(&EmulatorContext, Number);
|
softx86_ext_hw_signal(&EmulatorContext, Number);
|
||||||
|
#else
|
||||||
|
/* Call the Soft386 API */
|
||||||
|
Soft386Interrupt(&EmulatorContext, Number, TRUE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue