This information comes from the XSET
package, the program that allows you to put EVERYTHING you want
in a DOS environment variable and use it as if you had assigned
it the value with the standard DOS command SET.
DOS provides a method to tell COMMAND.COM how much environment space you want:
where You may use this feature in your CONFIG.SYS file with the SHELL command:
You can read more about this in your DOS manual.
The problem is when an application (any DOS shell like Norton
Commander or PC-Tools for example) launches a new
copy of COMMAND.COM. The default environment size for
a new COMMAND.COM being loaded is hard-coded in the COMMAND.COM
program and is in most of the case largely insufficient. Here is the way to change this value.The presented sections of code are from MS-DOS 5.00 dis-assembled with DEBUG so that those with other versions of DOS find the offsets for their COMMAND.COM. In other DOS versions, the section of code to be patched is unchanged, it is simply shifted in position so it's just a question of locating the correct offsets by searching for strings of bytes from the sections of code listed below. The main trick here is to avoid addresses in the code which are likely to be different (most absolute addresses will be different while relative addresses may or may not be different). Assuming you're handy with DEBUG or a similar debugger and know some 8088 assembly, you should be able to pull it off. If DEBUG's search command is too limited, you might try unassembling the whole COMMAND.COM to a text file and using an editor or lister utility to search.
ENVIRONMENT SIZE: This example is for MS-DOS 5.0
1111:165B 58 POP AX
The default value for the environment size is 10 paragraphs of
16 bytes.
So, to change your default environment size to 1280 (50 paragraphs),
type:
DEBUG COMMAND.COM
Here are the offsets for some MS-DOS versions:
6.22: 1777 (default size: 20h * 16 bytes = 512)
|
|
|
|
|
Recommanded by Microsoft in book "Distributing Microsoft Office 2000" | |
Featured in Lockergnome e-Zine |