From 0d91854d88d032ed7003555de38b31276b383bf6 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Wed, 22 Apr 2015 19:56:50 +0000 Subject: [PATCH] [NTVDM] Implement the XMS functions AH = 03h and AH = 04h (global enable/disable A20). Make the GetHandleRecord function in the EMS driver inline. CORE-8277 #comment Please retest. svn path=/trunk/; revision=67352 --- .../subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.c | 2 +- .../subsystems/mvdm/ntvdm/dos/dos32krnl/himem.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.c b/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.c index 0c1bcb43f92..246e0424018 100644 --- a/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.c +++ b/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/emsdrv.c @@ -35,7 +35,7 @@ static PVOID EmsMemory = NULL; /* PRIVATE FUNCTIONS **********************************************************/ -static PEMS_HANDLE GetHandleRecord(USHORT Handle) +static inline PEMS_HANDLE GetHandleRecord(USHORT Handle) { if (Handle >= EMS_MAX_HANDLES) return NULL; return &HandleTable[Handle]; diff --git a/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/himem.c b/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/himem.c index 99bbddd581c..f6f4de71e0e 100644 --- a/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/himem.c +++ b/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/himem.c @@ -164,6 +164,20 @@ static VOID WINAPI XmsBopProcedure(LPWORD Stack) break; } + /* Global Enable A20 */ + case 0x03: + { + EmulatorSetA20(TRUE); + break; + } + + /* Global Disable A20 */ + case 0x04: + { + EmulatorSetA20(FALSE); + break; + } + /* Query Free Extended Memory */ case 0x08: {