From bdee759b6e146ec13bb1be9bbf972d518c43cea6 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Sun, 12 Jul 2015 23:16:16 -0500 Subject: [PATCH] ok modified: src/lib/16_mm.c --- src/lib/16_mm.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 7b8dfec9..f63c126a 100644 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -300,6 +300,32 @@ unsigned MM_MapEMS(mminfo_t *mm) return 0; } +/* +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 + + '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 + +END SUB +*/ + //========================================================================== /* -- 2.39.5