extern unsigned int far XMS_Setup(void); /* MUST BE CALLED PRIOR TO */
/* OTHER XMS_ ROUTINES! */
extern unsigned char far XMS_FreeMem( /* returns free and total extended */
unsigned int far *freemem, /* free extended memory in K */
unsigned int far *totmem); /* total extended memory in K */
extern unsigned char far XMS_Version( /* Returns version information */
unsigned int far *version, /* BCD protocol version (2.0) */
unsigned int far *internal, /* BCD internal version number */
unsigned int far *HMA); /* Does the HMA exist? */
extern unsigned char far XMS_RequestHMA( /* Try to allocate HMA */
unsigned int mysize); /* amount you'll be using in K. */
/* Applications should use 0xffff to */
/* allocate all 64k */
extern unsigned char far XMS_ReleaseHMA(void); /* give up the HMA */
extern unsigned char far XMS_GlobalEnableA20(void); /* when the A20 line */
extern unsigned char far XMS_GlobalDisableA20(void); /* is enabled, the HMA */
extern unsigned char far XMS_LocalEnableA20(void); /* can be accessed. */
extern unsigned char far XMS_LocalDisableA20(void);
extern unsigned char far XMS_QueryA20( /* Find out if A20 is enabled */
unsigned int far *state);
extern unsigned char far XMS_AllocEMB( /* Allocate extended momory */
unsigned int mysize, /* size in K needed */
XMShandle far *handle); /* handle for this EMB */
extern unsigned char far XMS_FreeEMB( /* Release an EMB */
XMShandle handle); /* handle to release */
extern unsigned char far XMS_MoveEMB( /* Move between real memory and */
struct EMMMoveStruct far *MoveRec);/* extended memory. */
extern unsigned char far XMS_LockEMB( /* make sure a memory block doesn't */
XMShandle handle, /* move. */
void far *address); /* LINEAR memory address for this block */
extern unsigned char far XMS_UnlockEMB( /* undo a lock */
XMShandle handle);
extern unsigned char far XMS_GetEMBHandleInfo( /* info on a handle */
XMShandle handle, /* handle info wanted on */
unsigned char far *LockCount, /* number of locks enabled */
unsigned char far *EMBHandlesFree, /* total handles free in system */
unsigned int far *EMBlength); /* size of this handle in K */
extern unsigned char far XMS_ReallocEMB( /* Try to change the size of */
XMShandle handle, /* this block. */
unsigned int newsize); /* new size in K */
extern unsigned char far XMS_RequestUMB( /* request UPPER MEMORY BLOCK */
unsigned int SizeWanded, /* size in PARAGRAPHS needed */
unsigned int far *segaddr, /* segment address of block */
unsigned int far *SizeUgot); /* size of block you got */
extern unsigned char far XMS_ReleaseUMB( /* Release UMB */
unsigned int segaddr);