Organization: FidoNet node 1:3603/150.473 - Carrie's Living Roo, Largo FL
Lines: 49
To: wagner@main.mndly.umn.edu
29 Aug 92, Rick Wagner writes to All:
RW> Set AX=4310h and INT 2F. This will return the address of the XMS
RW> driver in ES:BX. I can call this function with an INT86x and get the
RW> address returned (confirmed) but I can't figure out how to call the XMS
RW> driver at ES:BX. I read the longjump stuff in the manual and I'm now
RW> totally confused.
RW>
1. Longjmp() has got nothing to do with this... it is for unwinding the stack after a failed operation 57 function calls deep or for switching tasks in pseudo-multitaskers.
2. Take a look at this...
typedef void far (*XF)() = 0;
unsigned short usXMSSeg = 0;
unsigned short usXMSOff = 0;
XF xfXMS = (XF)0;
int GetXMSPtr()
{
_AX=0x4310;
geninterrupt(0x2f);
usXMSOff = _BX;
usXMSSeg = _ES;
xfXMS = (XF)MK_FP(usXMSSeg, usXMSOff);
return xfXMS != 0;
};
// example to call XMS driver with AX set to some value
int XMSCall(unsigned short axval)
{
_AX=axval;
xfXMS();
return _AX;
}
Hope this clears up some of the confusion for you.