From: sparky4 Date: Sat, 4 Jul 2015 03:17:09 +0000 (-0500) Subject: here! X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=ed6a6d3e013cfe95f25ebab2729767763b3f4af2;p=16.git here! modified: exmmtest.exe modified: src/lib/16_mm.c modified: src/lib/16_mm.h --- diff --git a/exmmtest.exe b/exmmtest.exe index 8346f750..bab546ee 100644 Binary files a/exmmtest.exe and b/exmmtest.exe differ diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 77466490..90b07cd7 100644 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -420,13 +420,13 @@ void MML_ShutdownXMS(mminfo_t *mm) ====================== */ -void MML_UseSpace(/*d*/word segstart, /*d*/word seglength, mminfo_t *mm) +void MML_UseSpace(/*d*/word segstart, dword seglength, mminfo_t *mm) { mmblocktype huge *scan,huge *last; - /*d*/word oldend; + dword oldend; /*d*/word fat=0; word segm=0; - /*d*/word extra; + dword extra; scan = last = mm->mmhead; mm->mmrover = mm->mmhead; // reset rover to start of memory @@ -614,11 +614,11 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi) MML_SetupEMS(mm); // allocate space 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! //TODO: EMS4! AND EMS 3.2 MASSIVE DATA HANDLMENT! - MML_UseSpace(mm->EMSpageframe,(/*mm->EMSpagesmapped*/4)*0x4000lu, mm); + MML_UseSpace(mm->EMSpageframe,(mm->EMSpagesmapped)*0x4000lu, mm); //printf("EMS3\n"); MM_MapEMS(mm); // map in used pages //printf("EMS4\n"); - mmi->EMSmem = (/*mm->EMSpagesmapped*/4)*0x4000lu; + mmi->EMSmem = (mm->EMSpagesmapped)*0x4000lu; } // @@ -1230,3 +1230,30 @@ void MM_FreeBlock(mmblocktype *x, mminfo_t *mm) x->next=mm->mmfree; mm->mmfree=x; } + +void MM_seguin(void) +{ + __asm + { + push ds + inc ds + } +} + +void MM_segude(void) + __asm + { + pop ds + } +} + +/* +pull data from far and put it into ds var +mov ax,es:si +mov x,ax +*/ +/* +ss stack segment +sp top of stack +bp bottem of stack +*/ diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index d1ccd0da..1ef85c95 100644 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -116,6 +116,8 @@ typedef struct mmblockstruct { word start,length; //dword start,length; + //word start; + //dword length; unsigned attributes; memptr *useptr; // pointer to the segment start struct mmblockstruct huge *next; @@ -161,7 +163,7 @@ unsigned MM_MapEMS(mminfo_t *mm); boolean MML_CheckForXMS(mminfo_t *mm); void MML_SetupXMS(mminfo_t *mm, mminfotype *mmi); void MML_ShutdownXMS(mminfo_t *mm); -void MML_UseSpace(/*d*/word segstart, /*d*/word seglength, mminfo_t *mm); +void MML_UseSpace(/*d*/word segstart, dword seglength, mminfo_t *mm); void MML_ClearBlock(mminfo_t *mm); void MM_Startup(mminfo_t *mm, mminfotype *mmi);