Article View: comp.os.msdos.programmer
Article #5200Re: COMMAND.COM patch for bigger environments?
From: Joe Morris
Date: Thu, 14 Mar 1991 14:29
Date: Thu, 14 Mar 1991 14:29
42 lines
2573 bytes
2573 bytes
Timothy.Litton@comp.vuw.ac.nz (Tim Litton) writes:
>In article <2835@sparko.gwu.edu>, timur@seas.gwu.edu (The Time Traveler)
>writes:
>|> Could someone re-post the patch for COMMAND.COM (PC-DOS 4.0x) that
>|> enlarges the default environment size? Thanx!
> Sorry, but am I missing something somewhere??
>There was a time, when, back then, in order to increase the environment
>size of command.com you included the line..
>SHELL=[drive]:\[path]COMMAND.COM /P /E:[size]
>in your config.sys????
The SHELL= line in CONFIG.SYS affects only the copy of COMMAND which is
loaded at boot time. If you're running a program and spawn a DOS shell
the system will give you an environment space size equal to the currently
active space (i.e., the space occupied by current definitions) or 160 bytes,
whichever is larger. Note that this means that if you are currently using
more than 160 bytes of environment space that your spawned shell will
have *no* available environment space beyond whatever is left in
the last 16-byte allocation block.
The problem can be bypassed if the program spawning the shell specifies
the /E:xxxx parameter to increase the default to a value larger than 160.
Unfortunately, I've never seen *any* program do this.
You can fix this by patching COMMAND.COM to increase the default value
above 160 bytes. I don't run 4.anything so I can't help DOS4 users, but
you can change the PC-DOS 3.3 version by the following:
debug command.com
d eb4 eb9 <--- See what you are about to change
e eb8 20 <--- this byte has the number of 16-byte paragraphs
to be allocated. Default value is hex 0A for
10 (decimal) 16-byte blocks, or 160 bytes.
Using hex 20 allocates 512 bytes.
d eb4 eb9 <--- see it again
w <--- write it out
q <--- vamos.
Joe Morris
Technical Details
Message-ID:
<jcmorris.668960969@mwunix.mitre.org>Path:
arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!think.com!linus!linus!mwunix.mitre.org!jcmorrisReferences:
<2835@sparko.gwu.edu> <1991Mar13.194726.16534@comp.vuw.ac.nz>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!think.com!linus!linus!mwunix.mitre.org!jcmorris From: jcmorris@mwunix.mitre.org (Joe Morris) Newsgroups: comp.os.msdos.programmer Subject: Re: COMMAND.COM patch for bigger environments? Message-ID: <jcmorris.668960969@mwunix.mitre.org> Date: 14 Mar 91 14:29:29 GMT References: <2835@sparko.gwu.edu> <1991Mar13.194726.16534@comp.vuw.ac.nz> Sender: news@linus.mitre.org (News Service) Organization: The MITRE Corporation, Bedford MA Lines: 42 Nntp-Posting-Host: mwunix.mitre.org