union REGS CPURegs;
EMShandle=mm->EMShandle;
- for (i=0;i<4/*mm->EMSpagesmapped*/;i++)
+ for (i=0;i<mm->EMSpagesmapped;i++)
{
__asm
{
return 0;
}
-/*
-SUB EMS.MapXPages (PhysicalStart, LogicalStart, NumPages, Handle)\r
+void MM_MapXEMS(mminfo_t *mm)
+{
+ union REGS CPURegs;
+
+//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
+ //\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
+ ///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
}
if(mm->mmstarted)
MM_Shutdown(mm);
-
+printf(".\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); //bug!
mm->mmstarted = true;
mm->bombonerror = true;
//
mm->mmblocks[i].next = &(mm->mmblocks[i+1]);
}
mm->mmblocks[i].next = NULL;
-
+printf(".\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); //bug!
//
// locked block of all memory until we punch out free space
//
mm->mmnew->attributes = LOCKBIT;
mm->mmnew->next = NULL;
mm->mmrover = mm->mmhead;
-
+printf(".\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); //bug!
// farlen=_bios_memsize()*1024;
//
segstart = FP_SEG(start)+(FP_OFF(start)+15)/16;
MML_UseSpace(segstart,seglength, mm);
mmi->nearheap = length;
- //printf("near heap ok!\n");
+ printf("near heap ok!\n");
//
// get all available far conventional memory segments
MML_UseSpace(segstart,seglength, mm);
mmi->farheap = length;
mmi->mainmem = mmi->nearheap + mmi->farheap;
- //printf("far heap ok!\n");
+ printf("far heap ok!\n");
//
if(MML_CheckForEMS())
{
printf("Expanded memory manager present. EMM v%x.%x available\n", mm->EMSVer>>4,mm->EMSVer&0x0F);
- printf("totalEMSpages=%u\n", mm->totalEMSpages);
- printf("Page frame @0x%04x\n", mm->freeEMSpages);
- printf("EMSpageframe=%x\n", mm->EMSpageframe);
+ printf("totalEMSpages=%u ", mm->totalEMSpages);
+ printf("freeEMSpages=%u\n", mm->freeEMSpages);
+ printf("Page frame @0x%04x\n", mm->EMSpageframe);
+ //printf("EMSpageframe=%x\n", );
}
if(MML_CheckForXMS(mm)) printf("XMSaddr=%Fp\n", *XMSaddr);
printf("near=%lu\n", mmi->nearheap);