Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- XMS Specification (version 3.0) - <b>prioritizing hma usage</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PRIORITIZING HMA USAGE

For DOS users to receive the maximum benefit from the High Memory Area,
programs which use the HMA must store as much of their resident code in
it as is possible. It is very important that developers realize that the
HMA is allocated as a single unit.

For example, a TSR program which grabs the HMA and puts 10K of code into
it may prevent a later TSR from putting 62K into the HMA.  Obviously,
regular DOS programs would have more memory available to them below the
640K line if the 62K TSR was moved into the HMA instead of the 10K one.

.The first method for dealing with conflicts such as this is to require
programs which use the HMA to provide a command line option for
disabling this feature.  It is crucial that TSRs which do not make full
use of the HMA provide such a switch on their own command line
(suggested name "/NOHMA").

The second method for optimizing HMA usage is through the
/HMAMIN=parameter on the XMS device driver line.  The number after the
parameter is defined to be the minimum amount of HMA space (in K-bytes)
used by any driver or TSR. For example, if "DEVICE=HIMEM.SYS /HMAMIN=48"
is in a user's CONFIG.SYS file, only programs which request at least 48K
would be allowed to allocate the HMA.  This number can be adjusted
either by installation programs or by the user himself.  If this
parameter is not specified, the default value of 0 is used causing the
HMA to be allocated on a first come, first served basis.

Note that this problem does not impact application programs.  If the HMA
is available when an application program starts, the application is free
to use as much or as little of the HMA as it wants.  For this reason,
applications should pass FFFFh in DX when calling Function 01h.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson