X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fexmm%2Fmemory.c;h=21b213f854d2ee7858c286094ef867dbd1f78de6;hb=be16a39d3ed2b062cca8167096a24dd7aa826b44;hp=38b12255b41e45e2ef7c269f6fe9e64a4e793f13;hpb=88a70251309902e450052de212343e9d1835d834;p=16.git diff --git a/src/lib/exmm/memory.c b/src/lib/exmm/memory.c old mode 100644 new mode 100755 index 38b12255..21b213f8 --- a/src/lib/exmm/memory.c +++ b/src/lib/exmm/memory.c @@ -28,13 +28,13 @@ //static globals -------------------------------- static int ActiveEMList[MAXEMHANDLES]; -static unsigned int EMMSeg; +static unsigned long EMMSeg; //forward declarations --------------------------------- static int EMPresent(void); static int EMReady(void); -static unsigned int GetEMMSeg(void); +static unsigned long GetEMMSeg(void); static int GetEMHandle(int NumPages); static int EMMap(int Handle, int LogPg, int PhyPg); static int FreeEMHandle(int Handle); @@ -308,7 +308,7 @@ EMReady(void) /********************************************************************/ -static unsigned int +static unsigned long GetEMMSeg(void) { unsigned int EMSegment; @@ -328,7 +328,31 @@ GetEMMSeg(void) //NotReady: // return(NOTREADY); -} /* End of GetEMMSeg() */ +} /* End of GetEMMSeg() */ + +/********************************************************************/ + +unsigned long +GetEMMSeg0(void) +{ + unsigned int EMSegment; + + _asm { + mov ah,0x41 /* get EMM page frame segment */ + int 0x67 + or ah,ah + js NotReady /* returns 80, 81, or 84 hex on error */ + mov EMSegment,bx + jmp End + NotReady: + mov EMSegment,NOTREADY + End: + } + return(EMSegment); /*lint !e530 */ + +//NotReady: +// return(NOTREADY); +} /* End of GetEMMSeg0() */ /********************************************************************/