mov ax, 4310h ;Get HIMEM.SYS Entry-Point Address
int 2Fh ;Multiplex Interrupt
mov word ptr [XMMAddr], bx
mov word ptr [XMMAddr+2], es ;es:bx contains entry-point address
Get HIMEM.SYS Entry-Point Address (Interrupt 2Fh Function 4310h) returns the 32-bit address (segment:offset) of the entry point for the extended-memory-management functions for HIMEM.SYS.
This function has no parameters.
The ES:BX registers contain the 32-bit address (segment:offset) of the entry point.
Before retrieving and calling this entry point, programs must use Get HIMEM.SYS Installed State (Interrupt 2Fh Function 4300h) to ensure that HIMEM.SYS has been loaded.
The extended-memory-management functions enable programs to manage extended memory, the high memory area (HMA), and upper memory blocks (UMBs). Programs also use the functions to enable and disable the A20 address line. A program calls a function by placing the function number in the AH register, filling other registers as needed, and calling the entry point. Following is a list of the extended-memory-management functions:
Number | Name |
00h | Get XMS Version |
01h | Allocate HMA |
02h | Free HMA |
03h | Global Enable A20 Line |
04h | Global Disable A20 Line |
05h | Local Enable A20 Line |
06h | Local Disable A20 Line |
07h | Query A20 Line Status |
08h | Query Free Extended Memory |
09h | Allocate EMB |
0Ah | Free EMB |
0Bh | Move EMB |
0Ch | Lock EMB |
0Dh | Unlock EMB |
0Eh | Get Handle Information |
0Fh | Resize EMB |
10h | Allocate UMB |
11h | Free UMB |
A full description of these functions is beyond the scope of this book. For more information about them, see the Lotus/Intel/Microsoft/AST eXtended Memory Specification (XMS) version 2.0.
Programs must not use extended-memory-management functions to manage the HMA or UMBs if MS-DOS already manages these areas.
This function returns the entry-point address of any extended-memory manager as long as the manager conforms to the eXtended Memory Specification.
Interrupt 2Fh Function 4300h Get HIMEM.SYS Installed State