]> 4ch.mooo.com Git - 16.git/commitdiff
here!
authorsparky4 <sparky4@cock.li>
Sat, 4 Jul 2015 03:17:09 +0000 (22:17 -0500)
committersparky4 <sparky4@cock.li>
Sat, 4 Jul 2015 03:17:09 +0000 (22:17 -0500)
modified:   exmmtest.exe
modified:   src/lib/16_mm.c
modified:   src/lib/16_mm.h

exmmtest.exe
src/lib/16_mm.c
src/lib/16_mm.h

index 8346f750358b7a1616e2908d2d4f67c4f2909385..bab546ee5dfbe899c6f7d7b4c106d8e40481f04d 100644 (file)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 7746649093607c9506eec83d4bdfed12d34b0cee..90b07cd731f56862aeaccca0fd89c8db343468b8 100644 (file)
@@ -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
+*/
index d1ccd0da33bf34619ee8ec45fd4b73555fabf646..1ef85c953182f2a16e0bb27e149c5e4a9418383c 100644 (file)
@@ -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);