]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_mm.h
16.exe serial print debug
[16.git] / src / lib / 16_mm.h
old mode 100644 (file)
new mode 100755 (executable)
index 1d82e82..963eb3a
@@ -26,7 +26,6 @@
 #include "src/lib/16_head.h"
 #include "src/lib/16_hc.h"
 //#include "src/lib/modex16.h"
-//#include "src/lib/16_ca.h"
 //++++mh       #include "src/lib/16_in.h"
 
 #ifdef __DEBUG__               // 1 == Debug/Dev  ;  0 == Production/final
 #endif
 
 //#define GETNEWBLOCK {if(!(mmnew=mmfree))Quit("MM_GETNEWBLOCK: No free blocks!") ;mmfree=mmfree->next;}
-#define GETNEWBLOCK {if(!mm->mmfree)MML_ClearBlock(mm);mm->mmnew=mm->mmfree;mm->mmfree=mm->mmfree->next;mm->endid++;}
+#define GETNEWBLOCK {if(!mm->mmfree)MML_ClearBlock(mm);mm->mmnew=mm->mmfree;mm->mmfree=mm->mmfree->next;}
 
-#define FREEBLOCK(x) {*x->useptr=NULL;x->next=mm->mmfree;mm->mmfree=x;mm->endid--;}
-
-#define AARED          "\x1b[41;31m"
-#define AABLUE         "\x1b[44;34m"
-#define AAGREEN        "\x1b[42;32m"
-#define AAYELLOW       "\x1b[43;33m"
-#define AAGREY         "\x1b[47;37m"
-#define AABLACK        "\x1b[40;30m"
-#define AAWHITE                "\x1b[47;37m"
-#define AAMAGENTA      "\x1b[45;35m"
-#define AARESET        "\x1b[0m"
+#define FREEBLOCK(x) {*x->useptr=NULL;x->next=mm->mmfree;mm->mmfree=x;}
 
 #define SAVENEARHEAP   0x200           // space to leave in data segment
 #define SAVEFARHEAP    0//x400                 // space to leave in far heap
 
 #define        BUFFERSIZE              0x1000          // miscelanious, allways available buffer
 
-#define MAXBLOCKS              1024
+//moved to typdefst
+//#define MAXBLOCKS            1024
 
 
 
 
 //==========================================================================
 
-typedef struct
+//moved to typdefst
+/*typedef struct
 {
        dword   nearheap,farheap,EMSmem,XMSmem,mainmem;
-} mminfotype;
+} mminfotype;*/
 
 //==========================================================================
 
@@ -125,17 +116,20 @@ extern void               (* XMSaddr) (void);             // far pointer to XMS driver
 #define PURGEMASK      0xfffc
 #define BASEATTRIBUTES 0       // unlocked, non purgable
 
-#define MAXUMBS                12
+//moved to typedefst
+//#define MAXUMBS              12
 #define MAPPAGES               4//mm->EMSpagesmapped
 
-typedef struct mmblockstruct
+//moved to typdefst
+/*typedef struct mmblockstruct
 {
-       //word  start,length;
-       word    start;  dword length;
-       word    blob;   //fore data larger than 64k
+       word    start,length;
+       //word  start;  dword length;
+       word    blob;   //for data larger than 64k
        unsigned        attributes;
        memptr          *useptr;        // pointer to the segment start
-       struct mmblockstruct huge *next;
+       //huge struct mmblockstruct huge *next;
+       struct mmblockstruct far *next;
 } mmblocktype;
 
 
@@ -143,7 +137,8 @@ typedef struct
 {
        memptr bufferseg;
        boolean         mmstarted, bombonerror, mmerror;
-       void huge       *farheap;
+       //huge void huge        *farheap;
+       void far        *farheap;
 #ifdef __BORLANDC__
        void    *nearheap;
 #endif
@@ -154,10 +149,10 @@ typedef struct
        unsigned        totalEMSpages,freeEMSpages,EMSpageframe,EMSpagesmapped,EMShandle;
        unsigned int EMSVer;
        word numUMBs,UMBbase[MAXUMBS];
-       word    endid;  //end of list
        //dword numUMBs,UMBbase[MAXUMBS];
-       mmblocktype     huge mmblocks[MAXBLOCKS],huge *mmhead,huge *mmfree,huge *mmrover,huge *mmnew;
-} mminfo_t;
+       //huge mmblocktype      huge mmblocks[MAXBLOCKS],huge *mmhead,huge *mmfree,huge *mmrover,huge *mmnew;
+       mmblocktype     far mmblocks[MAXBLOCKS],far *mmhead,far *mmfree,far *mmrover,far *mmnew;
+} mminfo_t;*/
 
 /*
 =============================================================================