A+ Certification / Beginners

himem.sys

himem.sys is a high memory manager that allows computers to access memory above the 1MB mark. It is loaded in the config.sys file with the following line:

device=c:\windows\himem.sys

An optional switch (/testram:off) can be used to bypass the memory test. This test is considered redundant by some people because RAM is tested during the POST (Power-On Self Test) process.

On Windows 9x systems, himem.sys is automatically loaded at the end of processing config.sys - that is, if it wasn't already loaded. The Windows 9x GUI requires himem.sys.

The addition of the line dos=high anywhere in your config.sys file causes a portion of command.com to be loaded into the HMA. Windows 9x systems automatically process dos=high if it is not present in the config.sys file.

emm386.exe

Windows does not require emm386.exe, but it can be used to optimize memory configurations or to support MS-DOS-based applications.

If you want to use emm386.exe to support your applications that require expanded memory, you can load emm386.exe in your config.sys file by editing config.sys with any text editor and adding the following line:

device=c:\windows\emm386.exe ram

Loading emm386.exe in this way creates a 64K page frame in the upper memory. This page frame comprises four 16K pages. emm386.exe uses extended memory to simulate expanded memory, but information that is being manipulated must reside below the 1MB mark of memory. To achieve this, information from extended memory is swapped into the page frame 16K at a time.

If you know that none of your applications require EMS, you can make additional space available as Upper Memory Blocks (UMB) by adding the following lines in config.sys using a text editor of your choice:

dos=umb
device=c:\windows\emm386 noems

Not all driver files and TSRs can be loaded into UMBs, but for those that can, you can modify device lines in config.sys to devicehigh, as shown in this example:

devicehigh=c:\windows\command\ansi.sys

You can also modify TSR lines in autoexec.bat using a text editor and placing an lh (load high) at the beginning of the line, like this:

lh c:\windows\smartdrv.exe

You can check on your success from the command prompt by typing the mem /c command. This gives you a listing of what has loaded into conventional memory and what has loaded into upper memory. Any drivers or TSRs that loaded into UMBs will have reduced conventional memory requirements.

You should note that drivers such as ramdrive.sys and ansi.sys have loaded into upper memory, and TSRs such as doskey.exe have also loaded into upper memory.

By using the include switch, you can include areas of upper memory that are reserved for other components. For example, i=B000-B7FF would include the area that is reserved for monochrome monitors, and i=E000- EFFF would include an area that is reserved for IBM PS/2 mice. An example of the full line emm386.exe line in config.sys would be:

device=a:\emm386.exe i=E000-EFFF i=B000-B7FF noems
[Previous] [Contents] [Next]