INT 10H 4f05H - Query/Set SuperVGA Video Memory Window

 Expects: AX    4f05H
          BH    SubFn number:  00H = Select memory window
                               01H = Query current memory window
          BL    window ID 0 or 1
          DX    (subfn 00H only) window position (see below)
          ──────────────────────────────────────────────────────────────────
 Returns: AX    VESA status: AH=0 means successful (else failed)
                             AL=4fH means function supported
          DX    current or new window position (see below)
          ──────────────────────────────────────────────────────────────────
    Info: This function is used to map chunks of video memory into CPU
          address space, or to find out which part of video memory is
          currently available to the CPU.

          The CPU address space for most systems is the 64K starting at
          a000:0.  Even in standard VGA modes, there are 256K of video
          memory to be accessed.  SVGA modes can require 1.3 MB (1280K) of
          video memory or more.

          For instance, in order to access graphical scan line 1024, you
          need to page-in the 20th page of video memory.  This function
          provides the interface to do that--and avoids needing to the port
          I/O or other obscure coding.

          Before using this function, you must use INT 10H 4f01H to obtain
          a SvgaModeInfoRec containing detailed information about the video
          mode.  For instance, the rWinBAttrs bit 1 will be 0 if only one
          video window is supported for that mode.  It also returns
          wWinGran, which is essential to determining what scan line gets
          pages in when you select a block with DX (see below).

       DX with subfn 00H, DX selects the chunk of memory that you want to
          make accessible.

          DX is a video memory address, expressed in "window granularity
          units".  The size of such a unit is given in the wWinGran field
          of the SvgaModeInfoRec.

          For instance, if wWinGran is 4, then the units are 4K, so
          addressing a scan line that begins at video memory offset 8193
          will require that DX be set to 2 to map in the third page of
          video memory.

          This call maps the specified page to the start of the video
          memory segment for the specified window.  The wWinASeg of
          SvgaModeInfoRec will provide the segment address in CPU terms
          (usually a000H).

   Notes: ■ This function can also be called via a FAR CALL, to avoid the
            INT-handler overhead.  Use INT 10H 4f01H to obtain the address
            of the function handler.

            When called directly, the value in AX is ignored, but other
            parameters are the same.  Upon return, AX and DX are destroyed.

          ■ Also note that the function address may change when you switch
            video modes, so be sure to obtain the right address, just
            before calling.

See Also: SVGA
          VESA/SVGA BIOS Services
                                    -♦-