]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_mm.c
ok
[16.git] / src / lib / 16_mm.c
index a021f2b6ed479eb17b904c3ae9c5d320185812fa..d6ce8743a5679958cc8c5d7da3e762f4278dbe86 100644 (file)
@@ -143,7 +143,7 @@ unsigned MML_SetupEMS(mminfo_t *mm)
        union REGS CPURegs;
 
        unsigned int EMSVer = 0;
-       byte    EMS_status;
+       //byte  EMS_status;
        unsigned        totalEMSpages,freeEMSpages,EMSpageframe,EMSpagesmapped,EMShandle;
        totalEMSpages = freeEMSpages = EMSpageframe = EMSpagesmapped = 0;
 
@@ -152,7 +152,7 @@ unsigned MML_SetupEMS(mminfo_t *mm)
                mov     ah,EMS_STATUS
                int     EMS_INT                                         // make sure EMS hardware is present
                or      ah,ah
-               mov     [EMS_status],ah
+               //mov   [EMS_status],ah
                jnz     error
 
                mov     ah,EMS_VERSION
@@ -302,34 +302,31 @@ unsigned MM_MapEMS(mminfo_t *mm)
        return 0;
 }
 
-/*
-SUB EMS.MapXPages (PhysicalStart, LogicalStart, NumPages, Handle)\r
+void MM_MapXEMS(mminfo_t *mm)
+{
+
+//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
+       //Maps up to 4 logical EMS pages to physical pages in the page frame, where:\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
+  /*//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
+//  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)
-{
-
+//END SUB
 }
 
 //==========================================================================
@@ -863,7 +860,7 @@ void MM_FreePtr(memptr *baseptr, mminfo_t *mm)
 
        if(!scan)
        {
-               printf("MM_FreePtr: Block not found!");
+               printf("MM_FreePtr: Block not found!\n");
                return;
        }
 
@@ -1194,7 +1191,7 @@ void MM_DumpData(mminfo_t *mm)
        free (mm->nearheap);
        dumpfile = fopen ("mmdump.txt","w");
        if (!dumpfile){
-               printf("MM_DumpData: Couldn't open MMDUMP.TXT!");
+               printf("MM_DumpData: Couldn't open MMDUMP.TXT!\n");
                return;
        }
 
@@ -1235,7 +1232,7 @@ void MM_DumpData(mminfo_t *mm)
        } while (lowest != 0xffff);
 
        fclose (dumpfile);
-       printf("MMDUMP.TXT created.");
+       printf("MMDUMP.TXT created.\n");
 }
 
 //==========================================================================