new file: 16/ems3.zip
modified: exmmtest.exe
modified: src/lib/16_mm.c
modified: src/lib/16_mm.h
char str[80];//,str2[10];
byte err;
boolean errorflag=false;
char str[80];//,str2[10];
byte err;
boolean errorflag=false;
unsigned int EMSVer = 0;
//byte EMS_status;
unsigned int EMSVer = 0;
//byte EMS_status;
- if(errorflag==true) printf("MML_ShutdownEMS: Error freeing EMS!"); //++++ add something
+ if(errorflag==true) printf("MML_ShutdownEMS: Error freeing EMS!\n"); //++++ add something
byte err;
boolean errorflag=false;
int i;
byte err;
boolean errorflag=false;
int i;
- for (i=0;i<MAPPAGES;i++)
+ for (i=0;i<4/*MAPPAGES*/;i++)
// EMS.Error = (Regs.ax AND &HFF00&) \ &H100 //Store the status code\r
\r
//END SUB
// EMS.Error = (Regs.ax AND &HFF00&) \ &H100 //Store the status code\r
\r
//END SUB
-/*
-char str[80];//,str2[10];
+ char str[80];//,str2[10];
unsigned EMShandle;
byte err;
boolean errorflag=false;
int i;
unsigned EMShandle;
byte err;
boolean errorflag=false;
int i;
+ if(mm->EMSVer<0x40)
+ return 5;
+
for (i=0;i<MAPPAGES;i++)
{
__asm
{
for (i=0;i<MAPPAGES;i++)
{
__asm
{
- mov ah,EMS_MAPPAGE
- mov bx,[i] // logical page
+ mov ah,EMS_MAPXPAGE
+ mov cx,[i] // logical page
mov al,bl // physical page
mov dx,[EMShandle] // handle
int EMS_INT
mov al,bl // physical page
mov dx,[EMShandle] // handle
int EMS_INT
if(errorflag==true)
{
//err = CPURegs.h.ah;
if(errorflag==true)
{
//err = CPURegs.h.ah;
- strcpy(str,"MM_MapEMS: EMS error 0x");
+ strcpy(str,"MM_MapXEMS: EMS error 0x");
//itoa(err,str2,16);
//strcat(str,&err);
//printf("%s\n",str);
//itoa(err,str2,16);
//strcat(str,&err);
//printf("%s\n",str);
}
//==========================================================================
}
//==========================================================================
#define EMS_GETPAGES 0x42
#define EMS_ALLOCPAGES 0x43
#define EMS_MAPPAGE 0x44
#define EMS_GETPAGES 0x42
#define EMS_ALLOCPAGES 0x43
#define EMS_MAPPAGE 0x44
+#define EMS_MAPXPAGE 0x50
#define EMS_FREEPAGES 0x45
#define EMS_VERSION 0x46
#define EMS_FREEPAGES 0x45
#define EMS_VERSION 0x46