Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- XMS Specification (version 3.0) - <b>calling the api functions</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
CALLING THE API FUNCTIONS

Programs can execute INT 2Fh with AH=43h and AL=10h to obtain the
address of the driver's control function.  The address is returned in
ES:BX.  This function is called to access all of the XMS functions.  It
should be called with AH set to the number of the API function
requested.  The API function will put a success code of 0001h or 0000h
in AX.  If the function succeeded (AX=0001h), additional information may
be passed back in BX and DX.  If the function failed (AX=0000h), an
error code may be returned in BL.  Valid error codes have their high bit
set.  Developers should keep in mind that some of the XMS API functions
may not be implemented by all drivers and will return failure in all
cases.

        Example:

        ; Get the address of the driver's control function

        mov     ax,4310h
        int     2Fh
        mov     word ptr [XMSControl],bx        ; XMSControl is a DWORD
        mov     word ptr [XMSControl+2],es

        ; Get the XMS driver's version number

        mov     ah,00h
        call    [XMSControl]    ; Get XMS Version Number

NOTE: Programs should make sure that at least 256 bytes of stack space
is available before calling XMS API functions.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson