Author: aandrejevic
Date: Wed May 6 03:52:19 2015
New Revision: 67574
URL:
http://svn.reactos.org/svn/reactos?rev=67574&view=rev
Log:
[NTVDM]
Implement EMS functions AH = 47h and AH = 48h (Save/Restore Page Map).
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.c [iso-8859-1] Wed May 6
03:52:19 2015
@@ -162,6 +162,8 @@
static VOID WINAPI EmsIntHandler(LPWORD Stack)
{
+ static PVOID MappingBackup[EMS_PHYSICAL_PAGES] = { NULL };
+
switch (getAH())
{
/* Get Manager Status */
@@ -218,6 +220,20 @@
{
setAH(EMS_STATUS_OK);
setAL(EMS_VERSION_NUM);
+ break;
+ }
+
+ /* Save Page Map */
+ case 0x47:
+ {
+ RtlCopyMemory(MappingBackup, Mapping, sizeof(PVOID) * EMS_PHYSICAL_PAGES);
+ break;
+ }
+
+ /* Restore Page Map */
+ case 0x48:
+ {
+ RtlCopyMemory(Mapping, MappingBackup, sizeof(PVOID) * EMS_PHYSICAL_PAGES);
break;
}