diff --git a/dlls/kernel32/instr.c b/dlls/kernel32/instr.c index 97a1d142c92..87e486d3616 100644 --- a/dlls/kernel32/instr.c +++ b/dlls/kernel32/instr.c @@ -773,8 +773,8 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT86 *context ) if (winedos.EmulateInterruptPM) { context->Eip += prefixlen + 2; - winedos.EmulateInterruptPM( context, instr[1] ); - return ExceptionContinueExecution; + if (winedos.EmulateInterruptPM( context, instr[1] )) return ExceptionContinueExecution; + context->Eip -= prefixlen + 2; /* restore eip */ } break; /* Unable to emulate it */ diff --git a/dlls/kernel32/kernel_private.h b/dlls/kernel32/kernel_private.h index dd7c91608fc..8d697077193 100644 --- a/dlls/kernel32/kernel_private.h +++ b/dlls/kernel32/kernel_private.h @@ -135,7 +135,7 @@ extern struct winedos_exports BOOL (*FreeDosBlock)(void* ptr); UINT (*ResizeDosBlock)(void *ptr, UINT size, BOOL exact); /* for instr.c */ - void (WINAPI *EmulateInterruptPM)( CONTEXT86 *context, BYTE intnum ); + BOOL (WINAPI *EmulateInterruptPM)( CONTEXT86 *context, BYTE intnum ); void (WINAPI *CallBuiltinHandler)( CONTEXT86 *context, BYTE intnum ); DWORD (WINAPI *inport)( int port, int size ); void (WINAPI *outport)( int port, int size, DWORD val ); diff --git a/dlls/winedos/dosexe.h b/dlls/winedos/dosexe.h index 7b77470558e..a6418493174 100644 --- a/dlls/winedos/dosexe.h +++ b/dlls/winedos/dosexe.h @@ -473,7 +473,7 @@ extern void WINAPI EMS_Ioctl_Handler(CONTEXT86*); /* interrupts.c */ extern void WINAPI DOSVM_CallBuiltinHandler( CONTEXT86 *, BYTE ); -extern void WINAPI DOSVM_EmulateInterruptPM( CONTEXT86 *, BYTE ); +extern BOOL WINAPI DOSVM_EmulateInterruptPM( CONTEXT86 *, BYTE ); extern BOOL WINAPI DOSVM_EmulateInterruptRM( CONTEXT86 *, BYTE ); extern FARPROC16 DOSVM_GetPMHandler16( BYTE ); extern FARPROC48 DOSVM_GetPMHandler48( BYTE ); diff --git a/dlls/winedos/interrupts.c b/dlls/winedos/interrupts.c index b482ab04644..f254f5a98e1 100644 --- a/dlls/winedos/interrupts.c +++ b/dlls/winedos/interrupts.c @@ -45,6 +45,7 @@ static void WINAPI DOSVM_Int2aHandler(CONTEXT86*); static void WINAPI DOSVM_Int41Handler(CONTEXT86*); static void WINAPI DOSVM_Int4bHandler(CONTEXT86*); static void WINAPI DOSVM_Int5cHandler(CONTEXT86*); +static void WINAPI DOSVM_DefaultHandler(CONTEXT86*); static FARPROC16 DOSVM_Vectors16[256]; static FARPROC48 DOSVM_Vectors48[256]; @@ -75,7 +76,8 @@ static const INTPROC DOSVM_VectorsBuiltin[] = /* 58 */ 0, 0, 0, 0, /* 5C */ DOSVM_Int5cHandler, 0, 0, 0, /* 60 */ 0, 0, 0, 0, - /* 64 */ 0, 0, 0, DOSVM_Int67Handler + /* 64 */ 0, 0, 0, DOSVM_Int67Handler, + /* 68 */ DOSVM_DefaultHandler }; @@ -257,7 +259,7 @@ static void DOSVM_PushFlags( CONTEXT86 *context, BOOL islong, BOOL isstub ) * Pushes interrupt frame to stack and changes instruction * pointer to interrupt handler. */ -void WINAPI DOSVM_EmulateInterruptPM( CONTEXT86 *context, BYTE intnum ) +BOOL WINAPI DOSVM_EmulateInterruptPM( CONTEXT86 *context, BYTE intnum ) { TRACE_(relay)("Call DOS int 0x%02x ret=%04x:%08x\n" " eax=%08x ebx=%08x ecx=%08x edx=%08x\n" @@ -326,12 +328,14 @@ void WINAPI DOSVM_EmulateInterruptPM( CONTEXT86 *context, BYTE intnum ) } else if (wine_ldt_is_system(context->SegCs)) { - DOSVM_CallBuiltinHandler( context, intnum ); + INTPROC proc = DOSVM_GetBuiltinHandler( intnum ); + if (!proc) return FALSE; } else { DOSVM_HardwareInterruptPM( context, intnum ); } + return TRUE; }