]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_mm.c
about to shit jis~
[16.git] / src / lib / 16_mm.c
index 065289cd9ecbf255afcc66c08fbf736426e2a813..1ae9e65ab9f94e24f706f0eded02541424963b6a 100644 (file)
@@ -270,7 +270,7 @@ unsigned MM_MapEMS(mminfo_t *mm)
        union REGS CPURegs;
        EMShandle=mm->EMShandle;
 
-       for (i=0;i<mm->EMSpagesmapped;i++)
+       for (i=0;i<4/*mm->EMSpagesmapped*/;i++)
        {
                __asm
                {
@@ -292,7 +292,7 @@ unsigned MM_MapEMS(mminfo_t *mm)
                        strcpy(str,"MM_MapEMS: EMS error 0x");
                        itoa(err,str2,16);
                        strcpy(str,str2);
-                       printf("%s\n",str);
+                       //printf("%s\n",str);
                        printf("FACK! %u\n", err);
                        return err;
                }
@@ -300,6 +300,36 @@ unsigned MM_MapEMS(mminfo_t *mm)
        return 0;
 }
 
+/*
+SUB EMS.MapXPages (PhysicalStart, LogicalStart, NumPages, Handle)\r
+\r
+  'Maps up to 4 logical EMS pages to physical pages in the page frame, where:\r
+  '\r
+  'PhysicalStart = Physical page first logical page is mapped to\r
+  'LogicalStart  = First logical page to map\r
+  'NumPages      = Number of pages to map (1 to 4)\r
+  'Handle        = EMS handle logical pages are allocated to\r
+\r
+  'Create a buffer containing the page information\r
+  FOR x = 0 TO NumPages - 1\r
+    MapInfo$ = MapInfo$ + MKI$(LogicalStart + x) + MKI$(PhysicalStart + x)\r
+  NEXT\r
+\r
+  Regs.ax = &H5000                           'Map the pages in the buffer\r
+  Regs.cx = NumPages                         'to the pageframe\r
+  Regs.dx = Handle\r
+  Regs.ds = VARSEG(MapInfo$)\r
+  Regs.si = SADD(MapInfo$)\r
+  InterruptX &H67, Regs, Regs\r
+  EMS.Error = (Regs.ax AND &HFF00&) \ &H100  'Store the status code\r
+\r
+END SUB
+*/
+void MM_MapXEMS(mminfo_t *mm)
+{
+
+}
+
 //==========================================================================
 
 /*