boolean errorflag=false;
union REGS CPURegs;
+ EMSVer = 0;
totalEMSpages = freeEMSpages = EMSpageframe = EMSpagesmapped = 0;
__asm
int EMS_INT
or ah,ah
jnz error
+ mov [EMSVer],ax // set EMSVer
cmp al,0x32 // only work on ems 3.2 or greater
jb error
======================
*/
-long MM_UnusedMemory (void)
+dword MM_UnusedMemory (void)
{
unsigned free;
mmblocktype far *scan;
======================
*/
-long MM_TotalFree (void)
+dword MM_TotalFree (void)
{
unsigned free;
mmblocktype far *scan;
//==========================================================================
+/*
+=====================
+=
+= MM_Report
+=
+=====================
+*/
+
+void MM_Report(void)
+{
+ printf("EMM %x available\n", EMSVer);
+ printf("totalEMSpages=%u\n", totalEMSpages);
+ printf("freeEMSpages=%u\n", freeEMSpages);
+ printf("EMSpageframe=%Fp\n", EMSpageframe);
+ printf("UnusedMemory=%lu\n", MM_UnusedMemory());
+ printf("TotalFree=%lu\n", MM_TotalFree());
+}
+
+//==========================================================================
+
+/*
+=====================
+=
+= MM_EMSVer
+=
+=====================
+
+
+int MM_EMSVer(void)\r
+{
+ int EMSver;\r
+ __asm
+ {
+ mov ah,EMS_VERSION\r
+ int EMS_INT
+ mov EMSver,ax\r
+ }
+ return(EMSver);\r
+}*/
+
+//==========================================================================
+
/*
=====================
=
bombonerror = bomb;
}
+//==========================================================================
+
///////////////////////////////////////////////////////////////////////////
//
// US_CheckParm() - checks to see if a string matches one of a set of
static boolean bombonerror;
static unsigned totalEMSpages,freeEMSpages,EMSpageframe,EMSpagesmapped,EMShandle;
+static unsigned int EMSVer;
static void (* XMSaddr) (void); // far pointer to XMS driver
void MM_ShowMemory (void);
-long MM_UnusedMemory (void);
-long MM_TotalFree (void);
+dword MM_UnusedMemory (void);
+dword MM_TotalFree (void);
+void MM_Report(void);
+//int MM_EMSVer(void);
void MM_BombOnError (boolean bomb);