Geoff Chappell - Software Analyst
DRAFT: Take more than your usual care.
This function obtains the High Memory Area (HMA) for a virtual-8086 caller in the first virtual machine in Windows/386 versions 2.10 and 2.11. It was concurrent with the use of HIMEM.SYS and the eXtended Memory Specification (XMS) for Windows/286 versions 2.10 and 2.11.
The function uses registers for both input and output.
|cx||size, in bytes, of HMA|
|es:di||address of HMA|
Windows/386 exposes the HMA only in the first virtual machine, i.e., in what later versions know as the System VM. The address and size are hard-coded as FFFE:0020 and FFE0h.
The function fails explicitly if called from any virtual machine than the first. Perhaps another interpretation is that the function succeeds for these other virtual machines but only to report that there is no HMA.
If callers are to distinguish this implemented failure from the function’s simply being unimplemented (as in earlier Windows/386 versions), they will need to clear cx to zero before calling.
The only known user is KERNEL.EXE. It needs first that int 2Fh function 1600h returns FFh in al. It executes int 2Fh function 1604h with cx cleared to zero. If cx is changed from zero, then the return in es:di is dismissed unless the segment part is FFFEh. Even then, the particular address and size are immaterial: the whole HMA is thereafter regarded as KERNEL’s to use.