How to use HIMEM

last update: 06/2003

HMA (A20) or Extended Memory? Nevermind. Both is supported by HIMEM. The first three steps are always the same steps:

step 1: check out whether an XMM is installed

To use XMS you have to check out, whether an XMS-driver is installed. This tells us the mutliplexinterrupt 2Fh. Put MUX-code 43h into AH and function-number 00h into AL. Is the result 80h an XMM is installed, otherwise - forget it. (Even other XMM give back 80h!)

step 2: determine the adress

The eXtended Memory Manager (XMM) is not used by interrupts but by FAR-calls. Therefore you need the XMM-adress. The multiplexinterrupt gives us the adress, when we call MUX-code 43h and function 10h. ES:BX will point on the XMM.

step 3: determine version

To make sure that everything will be right, you shouldn't be satisfied with less than version 2.0. Put 00h into AH and do a FAR-call to HIMEM (or whatever). After that AX has a BCD and AH contains the number left of the dot and AL right of the dot. BX contains an intern revisionnumber. DX tells you something about the HMA-access (0-access disabled, 1-access enabled).

step 4: do required function

From now on you need to know, what you want to do:

use the HMA,

use the UMBs,

or need some extended memory.

There are several functions of the extended memory manager.