Himem.sys

Index

Himem.sys is the device driver required by Dos to use extended memory (all installed RAM in excess of 1 Mb) including the free memory in the high memory area (HMA).

Syntax

Device=[Path] Himem.sys [/Switches]

[Path] The full path. Default is the root directory of the start-up drive (usually C:/).

The A20 handler controls access to extended memory (including the HMA):
/A20Control:ON HIMEM always takes control of the A20 line (Default).
/A20Control:OFF HIMEM only takes control of the A20 line if it is off when Himem.sys loads.

On some computers, HIMEM may change the CPU clock speed.
/CPUClock:OFF Ignores changes (if any) to CPU clock speed arising from loading HIMEM (Default).
/CPUClock:ON Prevents HIMEM from changing the CPU clock speed. Including this switch may slow down loading of Himem.sys slightly

By default, HIMEM will only recognise the first 16 Mb of RAM on EISA computers:
/EISA Specifies that HIMEM should allocate all available extended memory.
/NOEISA Specifies that HIMEM should not do EISA scanning for extended memory.

Only one application can use the High Memory Area (HMA) at one time. By default, HIMEM allocates the HMA to the first program that requests it whatever memory requirements it might have. This switch allows some control over the use of HMA by disqualifying small programs.
/HMAmin=m Sets the minimum memory requirements of a program before HIMEM will allocate HMA (if available) for its use.
m The minimum amount of memory to be requested. m must be in the range 0 to 63 (Default: 0).
The prime candidate for HMA is Dos as this will free up 43 Kb of conventional memory. However, HMA is not allocated until all device drivers and programs in Config.sys have been loaded. To improve the chances that Dos is loaded into the HMA, include the switch: HMAmin=40

Some older programs use the Interrupt 15h interface to allocate extended memory rather than using the XMS (eXtended-Memory Specification) method provided by HIMEM.
/INT15=xxxx Allocates extended memory to be reserved for the Interrupt 15h interface.
xxxx The amount of memory (in Kb) to be reserved for the Interrupt 15h interface.
64 < xxxx < 65535 (Default: 0). The value specified should be 64K more than the application requires because HMA is allocated from this as well. If xxxx is specified as less than 64, it is taken as 0.
/X Specifies not to use INT 15h (ax==E820h), the latest extended memory support API.
/NOABOVE16 Specifies not to use INT 15h (ax==E801h) Compaq Bigmem support to scan for extended memory.

HIMEM needs to have an understanding of the computer hardware on which it is installed in order to take control of the A20 address line. In most cases, HIMEM can automatically detect hardware but sometimes it gets confused and needs help.
/MACHINE:xxx Specifies the computer type.
xxx
Can be either the "Code" or "Number" to match the Computer Type as in:
Code       Number    Computer type
at           1       IBM AT or 100% compatible
ps2          2       IBM PS/2
ptlcascade   3       Phoenix Cascade BIOS
hpvectra     4       HP Vectra (A & A+)
att6300plus  5       AT&T 6300 Plus
acer1100     6       Acer 1100
toshiba      7       Toshiba 1600 & 1200XE
wyse         8       Wyse 12.5 Mhz 286
tulip        9       Tulip SX
zenith       10      Zenith ZBIOS
at1          11      IBM PC/AT (alternative delay)
at2          12      IBM PC/AT (alternative delay)
css          12      CSS Labs
at3          13      IBM PC/AT (alternative delay)
philips      13      Philips
fasthp       14      HP Vectra
ibm7552      15      IBM 7552 Industrial Computer
bullmicral   16      Bull Micral 60
dell         17      Dell XBIOS

When a program requires extended memory, it is allocated a "handle" to a block by HIMEM. Each available handle takes 6 bytes of conventional memory.
/NUMHANDLES=n Specifies the number of extended memory handles to be made available.
n The number of handles. 1 < n < 128 (Default: 32).

Some computers make ROM code run faster by "shadowing" it in RAM - that is, by copying the ROM code into faster RAM memory at startup. This, of course uses some extended memory. If there is less than 2MB of RAM available, HIMEM will attempt to disable Shadow RAM to make available as much extended memory as possible. It is unlikely that any computer running Dos7 will have less than 2 Mb RAM, so this switch is not particularly relevant
/ShadowRAM:OFF Disables Shadow RAM if there is less than 2 Mb of total RAM available. (Default).
/ShadowRAM:ON Leaves Shadow RAM on for all machines set up to run it.

The HIMEM memory test is more thorough than the standard power-up memory test performed by most computers and is able to identify unreliable memory.
/TestMem:ON Memory testing is undertaken at startup (Default).
/TestMem:Off Memory testing is not undertaken at startup. This option will slightly speed the startup process.

/V
or
/Verbose

Directs HIMEM to display status and error messages while loading. By default, HIMEM does not display any messages unless it encounters an error. As an alternative to using the switch, status messages can be displayed by holding down the Alt key while Himem is loading.

Notes

  1. In most cases, command-line options are not required. The default values for HIMEM.SYS are designed to work with most hardware.

  2. The Device line in Config.sys installing Himem.sys must come before any commands starting programs or devices using extended memory. Specifically, the Device=Himem.sys line must come before the Device=Emm386.exe and DOS=HIGH,UMB lines.

  3. The significance of a number of the above switches is, I regret, beyond my comprehension. I have included them here for completeness. However, not only have I not tested them, but have no idea on how to go about trying.

File Details

File NameDefault LocationDos Ver.Win Ver.SizeDateSource
Himem.sysc:\windows 7.0Win95 32 93511/07/95win95_03.cab
7.1Win95 (OSR2.x) 33 191124/08/96win95_02.cab
Win98 33 19111/05/98base5.cab
Win98 SE 33 191223/04/99?

Superscripts denote which same size files, if any, are identical (using FC).


If you should have any comments or suggestions,
please contact: Bob Watson
.
This page last revised:
August 28, 2000.