From aade8d75c56e2d11d6a71c5a374183c76671e994 Mon Sep 17 00:00:00 2001
From: sparky4 <sparky4@cock.li>
Date: Mon, 20 Jul 2015 20:16:51 -0500
Subject: [PATCH] issues with mapping EMS 	modified:   exmmtest.exe 
 modified:   src/lib/16_mm.c

---
 exmmtest.exe    | Bin 54696 -> 54696 bytes
 src/lib/16_mm.c |  45 +++++++++++++++++++++------------------------
 2 files changed, 21 insertions(+), 24 deletions(-)

diff --git a/exmmtest.exe b/exmmtest.exe
index 2a33a98b1c08e182de659cabb5be61ece83545da..79d3846acf7cb16ce35ae6fb11c1c24d51bc2b64 100644
GIT binary patch
delta 76
zcmV-S0JHz7s{^R31F$W?5-mqX009920|HPN00RU700ZEYKfr4Nos+A;TLGGr2f<_k
irIT#IaRG~y-obAI{s)s!!e{}#leofK0kg9c!<7=z&m7wT

delta 76
zcmV-S0JHz7s{^R31F$W?5->+a009920|HPN00RU700ZNbKfr4Npp&b>TLGPu2f<_k
isFQ5LaRH8#-obAIfe4dN!e{}&leofK0k*Rf!<7=t!5nu0

diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c
index 1e6c33c2..78aa5185 100644
--- a/src/lib/16_mm.c
+++ b/src/lib/16_mm.c
@@ -302,34 +302,31 @@ unsigned MM_MapEMS(mminfo_t *mm)
 	return 0;
 }
 
-/*
-SUB EMS.MapXPages (PhysicalStart, LogicalStart, NumPages, Handle)
+void MM_MapXEMS(mminfo_t *mm)
+{
+
+//SUB EMS.MapXPages (PhysicalStart, LogicalStart, NumPages, Handle)
 
-  'Maps up to 4 logical EMS pages to physical pages in the page frame, where:
-  '
-  'PhysicalStart = Physical page first logical page is mapped to
-  'LogicalStart  = First logical page to map
-  'NumPages      = Number of pages to map (1 to 4)
-  'Handle        = EMS handle logical pages are allocated to
+	//Maps up to 4 logical EMS pages to physical pages in the page frame, where:
+	//PhysicalStart = Physical page first logical page is mapped to
+	//LogicalStart  = First logical page to map
+	//NumPages      = Number of pages to map (1 to 4)
+	//Handle        = EMS handle logical pages are allocated to
 
-  'Create a buffer containing the page information
-  FOR x = 0 TO NumPages - 1
-    MapInfo$ = MapInfo$ + MKI$(LogicalStart + x) + MKI$(PhysicalStart + x)
-  NEXT
+  //Create a buffer containing the page information
+//  FOR x = 0 TO NumPages - 1
+//    MapInfo$ = MapInfo$ + MKI$(LogicalStart + x) + MKI$(PhysicalStart + x)
+//  NEXT
 
-  Regs.ax = &H5000                           'Map the pages in the buffer
-  Regs.cx = NumPages                         'to the pageframe
-  Regs.dx = Handle
-  Regs.ds = VARSEG(MapInfo$)
-  Regs.si = SADD(MapInfo$)
-  InterruptX &H67, Regs, Regs
-  EMS.Error = (Regs.ax AND &HFF00&) \ &H100  'Store the status code
+//  Regs.ax = &H5000                           //Map the pages in the buffer
+//  Regs.cx = NumPages                         //to the pageframe
+//  Regs.dx = Handle
+//  Regs.ds = VARSEG(MapInfo$)
+//  Regs.si = SADD(MapInfo$)
+//  InterruptX &H67, Regs, Regs
+//	EMS.Error = (Regs.ax AND &HFF00&) \ &H100  //Store the status code
 
-END SUB
-*/
-void MM_MapXEMS(mminfo_t *mm)
-{
-
+//END SUB
 }
 
 //==========================================================================
-- 
2.39.5