X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_mm.c;h=d6ce8743a5679958cc8c5d7da3e762f4278dbe86;hb=cb6c00f1a3dc82e68b0b35d4dcaf92fc47c14671;hp=f0c40f9ec4f53b210bba7444cc90f3a280c7fff5;hpb=974303f5ca3975d925d08452c175e09b77e8d4b4;p=16.git diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index f0c40f9e..d6ce8743 100644 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -272,7 +272,7 @@ unsigned MM_MapEMS(mminfo_t *mm) union REGS CPURegs; EMShandle=mm->EMShandle; - for (i=0;iEMSpagesmapped*/;i++) + for (i=0;i<4/*mm->EMSpagesmapped*/;i++) { __asm { @@ -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 } //==========================================================================