Lh, Loadhigh - DOS/Command Prompt Reference
Loads a program into the upper memory area of DOS and executes it.
[Windows NT series] This command is not available.
Syntax
lh [/L:<area1>[,<min-size1>][;<area2>[,<min-size2>][;...]] [/S]] <command> loadhigh [/L:<area1>[,<min-size1>][;<area2>[,<min-size2>][;...]] [/S]] <command>
lh, loadhigh | This command can be either ‘lh’ or ‘loadhigh’. |
/L:<area1>[,<min-size1>][;<area2>[,<min-size2>][;...]] |
Specifies the memory area to load the program. <area1> is the memory area number, and <min-size1> (optional) specifies the minimum size required for loading. You can determine the memory area number by calling the Mem command with the /F option. To specify multiple areas, separate them with a semicolon ‘;’ like this: 2nd area; 3rd area; and so on. If you want to specify conventional memory as an area, use 0 as the memory area number. |
/S | Minimizes the upper memory block used by the loaded program to the smallest size that fits the program. This option is typically used by the Memmaker tool. |
<command> | Specifies the program to be run in upper memory in the same way as running a program with a regular command line. It's also possible to add parameters to the program. |
Details
When the DOS=HIGH option is set in Config.sys and upper memory is made available with drivers like HIMEM.SYS and EMM386.EXE, this command loads a program into upper memory. This allows for the conservation of frequently used conventional memory, enabling the execution of larger programs.
When there is no available upper memory, Lh does nothing and runs <command> in the usual way.
When /L is specified, the program can only use the specified upper memory. If /L is not specified, the upper memory area required by the program is automatically allocated.
Samples
Sample 1
LH mscdex.exe /D:CDROM1
Loads Mscdex.exe (a program that allows using a CD drive in DOS when a CD driver for DOS is loaded) into upper memory. (Mscdex.exe must be present in a directory listed in the PATH.)
Sample 2
LH /L:1;3 foo.exe /L
Loads the program foo.exe into upper memory area 1 and makes it accessible in upper memory area 3. foo.exe is executed with the /L option specified.
Sample 3
LH /L:0;1;3 bar.exe /L
Loads the program bar.exe into conventional memory area (area 0) and makes it accessible in upper memory areas 1 and 3. bar.exe is executed with the /L option specified.