=======================\r
*/\r
\r
-void MML_SetupEMS (void)\r
+unsigned MML_SetupEMS (void)\r
{\r
char str[80],str2[10];\r
unsigned err;\r
strcpy(str,"MML_SetupEMS: EMS error 0x");\r
itoa(err,str2,16);\r
strcpy(str,str2);\r
- printf("%s\n",str);\r
- }\r
+ printf("%s\n",str);
+ return err;\r
+ }
+ return 0;\r
}\r
\r
\r
====================\r
*/\r
\r
-void MM_MapEMS (void)\r
+unsigned MM_MapEMS (void)\r
{\r
char str[80],str2[10];\r
unsigned err;\r
strcpy(str,"MM_MapEMS: EMS error 0x");\r
itoa(err,str2,16);\r
strcpy(str,str2);\r
- printf("%s\n",str);\r
+ printf("%s\n",str);
+ return err;\r
}\r
}\r
- return;\r
+ return 0;\r
}\r
\r
//==========================================================================\r
scan = scan->next;\r
}\r
\r
-// return free*16l;\r
- return free;\r
+ return free*16l;\r
+// return free;\r
}\r
\r
//==========================================================================\r
scan = scan->next;\r
}\r
\r
-// return free*16l;\r
- return free;\r
+ return free*16l;\r
+// return free;\r
}\r
\r
//==========================================================================\r
#include "src/lib/lib_head.h"
//++++mh #include "src/lib/16_in.h"
-//****#if 1 // 1 == Debug/Dev ; 0 == Production/final
+#ifdef __DEBUG__ // 1 == Debug/Dev ; 0 == Production/final
#define OUT_OF_MEM_MSG "MM_GetPtr: Out of memory!\nYou were short :%ld bytes"
-//****#else
-//****#define OUT_OF_MEM_MSG "\npee\n"
-//****#endif
+#else
+#define OUT_OF_MEM_MSG "\npee\n"
+#endif
#define SAVENEARHEAP 0x400 // space to leave in data segment
#define XMS_FREEUMB 0x11
//==========================================================================
+//I hope this is correct!
//__segment seg;
typedef void __based(__self) * memptr; //__based(seg) * memptr;
//
boolean MML_CheckForEMS (void);
+unsigned MML_SetupEMS (void);
void MML_ShutdownEMS (void);
-void MM_MapEMS (void);
+unsigned MM_MapEMS (void);
boolean MML_CheckForXMS (void);
void MML_ShutdownXMS (void);
void MML_UseSpace (unsigned segstart, unsigned seglength);