[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
* function: xms_get_driver
*
* description: get_xms_driver() returns the address of the XMS driver.
*     If the private variable driver_address has not been initalized,
*     it calls the undocumented function INTERRUPT to get it.
*-------------------------------------------------------------------------

FUNCTION LONG xms_get_driver

   VARDEF
      UINT  ax,bx,cx,dx,ds,si,es,di,bp
      UINT  x_d_a[2] based driver_address
   ENDDEF


   *---
   * If we don't already have the driver's address, go fetch it from
   * INT 2fh.  It'll come back as ES:BX (a double word).  We'll stuff
   * that into the private variable ``driver_address'' by using an
   * array called x_d_a of two UINTS based at the same address.
   *---
   if driver_address = &NULL
      if .not. xms_installed()
         return &X_NO_DRIVER
      else
         ax = &XMS_GETDRIVER
         interrupt( 0x2f, ax, bx, cx, dx, si, di, bp, ds, es)
         x_d_a[0] = bx
         x_d_a[1] = es
      endif
   endif

   return( driver_address )

ENDPRO


See Also: xms_installed() xms_avail() xms_get_version() xms_alloc() xms_free() hma_alloc() hma_free() xms_copy() xms_lock() xms_unlock()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson