]> 4ch.mooo.com Git - 16.git/commitdiff
damn!
authorsparky4 <sparky4@cock.li>
Tue, 21 Jul 2015 22:27:03 +0000 (17:27 -0500)
committersparky4 <sparky4@cock.li>
Tue, 21 Jul 2015 22:27:03 +0000 (17:27 -0500)
modified:   DEBUG.TXT
modified:   MMDUMP.TXT
modified:   exmmtest.exe
modified:   src/exmmtest.c
modified:   src/lib/16_ca.c
modified:   src/lib/16_mm.c
modified:   src/lib/16_mm.h

DEBUG.TXT
MMDUMP.TXT
exmmtest.exe
src/exmmtest.c
src/lib/16_ca.c
src/lib/16_mm.c
src/lib/16_mm.h

index bc6b5dd07c3d7600420d213b72fbc412b01593e1..c72a4e780e197da9ca62704523660f7b5a828f03 100644 (file)
--- a/DEBUG.TXT
+++ b/DEBUG.TXT
@@ -1,6 +1,3 @@
-Seg:0  Size:92176      Owner:0xfe5e\r
-Seg:1681       Size:4096       Owner:0x7298\r
-Seg:1caf       Size:8752       Owner:0x80\r
-Seg:5ed0       Size:529152     Owner:0x80\r
+Seg:11c3       Size:811328     Owner:0xc918\r
 \r
 MM_ShowMemory: Memory block order currupted!\r
index b1326e93291392981216abdbb22b968ea799c1f2..27e324d2b491cc9eac3d4c8a771241ea46327f16 100644 (file)
Binary files a/MMDUMP.TXT and b/MMDUMP.TXT differ
index ef66fe39907788a925839cb5352a156fa741c461..64ece4170e2510d135e90fdc85f123dadb85b12a 100644 (file)
Binary files a/exmmtest.exe and b/exmmtest.exe differ
index 1e40e9b9152845ffca156a0b1f83bbb7245cc5aa..ac19617b3c54157cd354dab178e514dab6cd4631 100644 (file)
 #include "src/lib/16_mm.h"
 #include "src/lib/modex16.h"
 
-//#define FILERL
+#define FILERL
 //#define FILEINIT
 
 void
 main(int argc, char *argv[])
 {
-       mminfo_t mm; mminfotype mmi;
-       memptr  bigbuffer;
-       __segment segu;
-       char *bakapee;
-       word baka;
+       static mminfo_t mm; mminfotype mmi;
+       static memptr   bigbuffer;
+       static __segment segu;
+       static char *bakapee;
+       static word baka;
        page_t screen;
 
        printf("&main()=%Fp\n", *argv[0]);
index fc40735329ff3c65701d0b70139f9a5c5b3562f0..bf94bc8c9b2ae9a3c23e598e4fa6770458f40bc1 100644 (file)
@@ -218,7 +218,7 @@ void CAL_GetGrChunkLength (int chunk)
 boolean CA_FarRead(int handle, byte huge *dest, dword length, mminfo_t *mm)\r
 {\r
        boolean flag;\r
-       dword fat=0;
+       /*dword fat=0;
        word segm=0;
        //if(mm->EMSVer<0x40)\r
        if(length>0xfffflu)
@@ -231,7 +231,7 @@ boolean CA_FarRead(int handle, byte huge *dest, dword length, mminfo_t *mm)
        }
 
        if(!fat&&!segm)
-       {\r
+       {*/\r
                __asm\r
                {\r
                        push    ds\r
@@ -257,7 +257,7 @@ done:
 End:\r
                }\r
        return flag;
-       }else return 0;//todo: EXPAND!!!\r
+       //}else return 0;//todo: EXPAND!!!\r
 }\r
 \r
 \r
@@ -274,7 +274,7 @@ End:
 boolean CA_FarWrite(int handle, byte huge *source, dword length, mminfo_t *mm)\r
 {\r
        boolean flag;\r
-       dword fat=0;
+       /*dword fat=0;
        word segm=0;
        //if(mm->EMSVer<0x40)\r
        if(length>0xfffflu)
@@ -287,7 +287,7 @@ boolean CA_FarWrite(int handle, byte huge *source, dword length, mminfo_t *mm)
        }\r
 
        if(!fat&&!segm)
-       {\r
+       {*/\r
                __asm\r
                {\r
                        push    ds\r
@@ -313,7 +313,7 @@ done:
 End:\r
                }\r
        return flag;
-       }else return 0;\r
+       //}else return 0;\r
 }\r
 \r
 \r
index 1bd9866aa7ac0fe5ba1e6c61930337d1bb6e77bd..e61b2deb9610ba80b761ae99425b8fa2cf4d6a5f 100644 (file)
@@ -641,7 +641,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
 //
 // set up the linked list (everything in the free list;
 //
-       printf("                linked list making!\n");
+//     printf("                linked list making!\n");
        mm->mmhead = NULL;
        mm->mmfree = &(mm->mmblocks[0]);
        for(i=0;i<MAXBLOCKS-1;i++)
@@ -653,7 +653,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
 //
 // locked block of all memory until we punch out free space
 //
-       printf("                newblock making!\n");
+//     printf("                newblock making!\n");
        MM_GetNewBlock(mm);
        mm->mmhead = mm->mmnew;                         // this will allways be the first node
        mm->mmnew->start = 0;
@@ -669,6 +669,7 @@ void MM_Startup(mminfo_t *mm, mminfotype *mmi)
 //---- length=coreleft();
        //_nheapgrow();
        length=_memmax();
+       //printf("      %u\n", length);
        start = (void huge *)(mm->nearheap = _nmalloc(length));
        length -= 16-(FP_OFF(start)&15);
        length -= SAVENEARHEAP;
@@ -747,10 +748,10 @@ 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
                MML_UseSpace(mm->EMSpageframe,(MAPPAGES)*0x4000lu, 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!
 printf("               EMS4\n");
-               if(mm->EMSVer<0x40)
+               //if(mm->EMSVer<0x40)
                        MM_MapEMS(mm, mmi);                                     // map in used pages
-               else
-                       MM_MapXEMS(mm, mmi);                                    // map in used pages
+               //else
+                       //MM_MapXEMS(mm, mmi);                                  // map in used pages
        }
 
 //
@@ -1265,7 +1266,7 @@ void MM_DumpData(mminfo_t *mm)
        FILE    *dumpfile;
 
 
-       free (mm->nearheap);
+       //++++free(mm->nearheap);
        dumpfile = fopen ("mmdump.txt","w");
        if (!dumpfile){
                printf("MM_DumpData: Couldn't open MMDUMP.TXT!\n");
@@ -1308,7 +1309,7 @@ void MM_DumpData(mminfo_t *mm)
 
        } while (lowest != 0xffff);
 
-       fclose (dumpfile);
+       fclose(dumpfile);
        printf("MMDUMP.TXT created.\n");
 }
 
index c40b9855e7674f4a0cfc36a0a46bb414c6a5bde6..8d71369dd7be6937e195ab23e3f72501e1968260 100644 (file)
 //++++mh       #include "src/lib/16_in.h"
 
 #ifdef __DEBUG__               // 1 == Debug/Dev  ;  0 == Production/final
-#define OUT_OF_MEM_MSG "MM_GetPtr: Out of memory!\nYou were short :%ld bytes"
+#define OUT_OF_MEM_MSG "MM_GetPtr: Out of memory!\nYou were short :%lu bytes"
 #else
 #define OUT_OF_MEM_MSG "\npee\n"
 #endif
 
 
-#define SAVENEARHEAP   0x200           // space to leave in data segment
+#define SAVENEARHEAP   0//x400         // space to leave in data segment
 #define SAVEFARHEAP    0//x4000                        // space to leave in far heap
 
 #define        BUFFERSIZE              0x1000          // miscelanious, allways available buffer
@@ -115,7 +115,7 @@ extern void         (* XMSaddr) (void);             // far pointer to XMS driver
 #define BASEATTRIBUTES 0       // unlocked, non purgable
 
 #define MAXUMBS                12
-#define MAPPAGES               mm->EMSpagesmapped
+#define MAPPAGES               4//mm->EMSpagesmapped
 
 typedef struct mmblockstruct
 {