mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
1.2 KiB
84 lines
1.2 KiB
/* xmsmisc.c - Misc. Support Functions for himem.
|
|
*
|
|
* xmsSysPageSize
|
|
* xmsQueryExtMem
|
|
*
|
|
* Modification History:
|
|
*
|
|
* Sudeepb 15-May-1991 Created
|
|
*/
|
|
|
|
#include "xms.h"
|
|
|
|
#include <xmssvc.h>
|
|
#include <softpc.h>
|
|
|
|
extern void UpdateKbdInt15(WORD Seg,WORD Off);
|
|
|
|
/* xmsSysPageSize - Get the System Page size.
|
|
*
|
|
*
|
|
* Entry - None
|
|
*
|
|
* Exit
|
|
* SUCCESS
|
|
* Client (AX) = Page Size in bytes
|
|
*
|
|
* FAILURE
|
|
* Not Valid
|
|
*/
|
|
|
|
VOID xmsSysPageSize (VOID)
|
|
{
|
|
SYSTEM_INFO SysInfo;
|
|
|
|
GetSystemInfo(&SysInfo);
|
|
|
|
setAX((USHORT)SysInfo.dwPageSize);
|
|
|
|
return;
|
|
}
|
|
|
|
|
|
|
|
/* xmsQueryExtMem - Get the extended memory for the vdm
|
|
*
|
|
*
|
|
* Entry - None
|
|
*
|
|
* Exit
|
|
* SUCCESS
|
|
* Client (AX) = Extended Memory in K
|
|
*
|
|
* FAILURE
|
|
* Not Valid
|
|
*/
|
|
|
|
VOID xmsQueryExtMem (VOID)
|
|
{
|
|
setAX((USHORT)(xmsMemorySize));
|
|
return;
|
|
}
|
|
|
|
|
|
/* xmsNotifyHookI15 - Informs softpc that someone is hooking I15
|
|
* - also returns the extended memory for the vdm
|
|
*
|
|
*
|
|
* Entry - Client (CS:AX) seg:off of new I15 vector
|
|
*
|
|
* Exit
|
|
* SUCCESS
|
|
* Client (CX) = Extended Memory in K
|
|
*
|
|
* FAILURE
|
|
* Not Valid
|
|
*/
|
|
|
|
VOID xmsNotifyHookI15 (VOID)
|
|
{
|
|
UpdateKbdInt15(getCS(), getAX());
|
|
|
|
setCX((USHORT)(xmsMemorySize));
|
|
return;
|
|
}
|