From 76f9d532f2db8c4fee1e8db52998a0ca61c5ff40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Mon, 12 May 2014 00:26:48 +0000 Subject: [PATCH] [NTVDM] Improve int32 callback stub (and sync int32.c too). svn path=/trunk/; revision=63248 --- reactos/subsystems/ntvdm/callback.c | 15 ++++++++------- reactos/subsystems/ntvdm/int32.c | 7 ++----- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/reactos/subsystems/ntvdm/callback.c b/reactos/subsystems/ntvdm/callback.c index feed3d80270..0cffdfd105a 100644 --- a/reactos/subsystems/ntvdm/callback.c +++ b/reactos/subsystems/ntvdm/callback.c @@ -75,8 +75,7 @@ BYTE Int16To32[] = 0xEB, 0xF5, // jmp BOP_SEQ (offset -11) // EXIT: - // 0x44, 0x44, // inc sp, inc sp - 0x83, 0xC4, 0x02, // add sp, 2 + 0x44, 0x44, // inc sp, inc sp 0xCF, // iret }; @@ -202,11 +201,13 @@ RegisterInt32(IN ULONG FarPtr, BYTE IntCallback[sizeof(Int16To32)/sizeof(BYTE)]; /* Check whether the 32-bit interrupt was already registered */ - // if (Int32Proc[IntNumber] != NULL) - // { - // DPRINT1("RegisterInt32: Interrupt 0x%X already registered!\n", IntNumber); - // return 0; - // } +#if 0 + if (Int32Proc[IntNumber] != NULL) + { + DPRINT1("RegisterInt32: Interrupt 0x%X already registered!\n", IntNumber); + return 0; + } +#endif /* Register the 32-bit interrupt handler */ Int32Proc[IntNumber] = IntHandler; diff --git a/reactos/subsystems/ntvdm/int32.c b/reactos/subsystems/ntvdm/int32.c index 2e9631df2e1..e139c85d44f 100644 --- a/reactos/subsystems/ntvdm/int32.c +++ b/reactos/subsystems/ntvdm/int32.c @@ -111,11 +111,8 @@ VOID InitializeInt32(WORD BiosSegment) BiosCode[Offset++] = 0xF5; // EXIT: - // BiosCode[Offset++] = 0x44; // inc sp - // BiosCode[Offset++] = 0x44; // inc sp - BiosCode[Offset++] = 0x83; // add sp, 2 - BiosCode[Offset++] = 0xC4; - BiosCode[Offset++] = 0x02; + BiosCode[Offset++] = 0x44; // inc sp + BiosCode[Offset++] = 0x44; // inc sp BiosCode[Offset++] = 0xCF; // iret