Author: aandrejevic
Date: Sat Sep 19 22:42:13 2015
New Revision: 69299
URL:
http://svn.reactos.org/svn/reactos?rev=69299&view=rev
Log:
[NTVDM]
Also save and restore the registers around other mouse callbacks
and the DOS driver routine calls.
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c
trunk/reactos/subsystems/mvdm/ntvdm/dos/mouse32.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c [iso-8859-1] Sat Sep 19
22:42:13 2015
@@ -47,8 +47,15 @@
static VOID DosCallDriver(DWORD Driver, PDOS_REQUEST_HEADER Request)
{
PDOS_DRIVER DriverBlock = (PDOS_DRIVER)FAR_POINTER(Driver);
+ WORD AX = getAX();
+ WORD CX = getCX();
+ WORD DX = getDX();
+ WORD BX = getBX();
+ WORD BP = getBP();
+ WORD SI = getSI();
+ WORD DI = getDI();
+ WORD DS = getDS();
WORD ES = getES();
- WORD BX = getBX();
/* Set ES:BX to the location of the request */
setES(DOS_DATA_SEGMENT);
@@ -64,9 +71,16 @@
/* Get the request structure from ES:BX */
RtlMoveMemory(Request, &Sda->Request, Request->RequestLength);
- /* Restore ES:BX */
+ /* Restore the registers */
+ setAX(AX);
+ setCX(CX);
+ setDX(DX);
+ setBX(BX);
+ setBP(BP);
+ setSI(SI);
+ setDI(DI);
+ setDS(DS);
setES(ES);
- setBX(BX);
}
static inline WORD NTAPI DosDriverReadInternal(PDOS_DEVICE_NODE DeviceNode,
Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/mouse32.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/dos/mouse32.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/dos/mouse32.c [iso-8859-1] Sat Sep 19 22:42:13
2015
@@ -310,8 +310,11 @@
BX = getBX();
CX = getCX();
DX = getDX();
+ BP = getBP();
SI = getSI();
DI = getDI();
+ DS = getDS();
+ ES = getES();
setAX(CallMask);
setBX(DriverState.ButtonState);
@@ -333,8 +336,11 @@
setBX(BX);
setCX(CX);
setDX(DX);
+ setBP(BP);
setSI(SI);
setDI(DI);
+ setDS(DS);
+ setES(ES);
}
}
}