VOID
NTAPI
-Soft386Interrupt(PSOFT386_STATE State, UCHAR Number)
+Soft386Interrupt(PSOFT386_STATE State, UCHAR Number, BOOLEAN Hardware)
{
- // TODO: NOT IMPLEMENTED!!!
- UNIMPLEMENTED;
+ SOFT386_IDT_ENTRY IdtEntry;
+
+ 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 EmulatorInterrupt(BYTE Number)
{
+#ifndef NEW_EMULATOR
LPDWORD IntVecTable = (LPDWORD)((ULONG_PTR)BaseAddress);
UINT Segment, Offset;
Segment = HIWORD(IntVecTable[Number]);
Offset = LOWORD(IntVecTable[Number]);
-#ifndef NEW_EMULATOR
/* Call the softx86 API */
softx86_make_simple_interrupt_call(&EmulatorContext, &Segment, &Offset);
#else
- UNREFERENCED_PARAMETER(Segment);
- UNREFERENCED_PARAMETER(Offset);
- // TODO: NOT IMPLEMENTED
+ /* Call the Soft386 API */
+ Soft386Interrupt(&EmulatorContext, Number, FALSE);
#endif
}
#ifndef NEW_EMULATOR
/* Call the softx86 API */
softx86_ext_hw_signal(&EmulatorContext, Number);
+#else
+ /* Call the Soft386 API */
+ Soft386Interrupt(&EmulatorContext, Number, TRUE);
#endif
}