🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.pc
Article #5693

Re: MS-DOS Environment Size

#5693
From: jrv
Date: Mon, 17 Feb 1986 16:01
55 lines
2355 bytes


For anyone who has not updated to DOS 3.1 and has run out of environment
space here is a patch to DOS 2.x COMMAND.COM which allows you to allocate
more than the default 10 paragraphs.

Run debug on command.com (It would be advisable to do this on a
duplicate copy in case something goes wrong with the patch.):

	c:> debug command.com <CR>

The allocation of memory for the operating systems copy of the environment
is hard coded as:

               Assembly Code       Hex Values
xxxx:0ece	MOV BX,000A	    BB 0A 00
xxxx:0ed1	MOV AH,48	    B4 48
xxxx:0ed3	INT 21		    CD 21

Search for this piece of code with the 's' command in debug:

	s 100 l 7fff bb 0a 00 b4 48 cd 21 <CR>

There should only be one occurence of this sequence. In my version of PC-DOS
2.1 (?) it is located at offset 'ece' in the file.

To allocate a larger environment space change the value which is loaded
into the 'bx' register using the 'e' command:

	e ecf 20 <CR>

The example here would allocate 20 hex paragraphs to the environment.
Complete the patch by writing the modified COMMAND.COM with the 'w' command:

	w <CR>

(No parameters are needed with the 'w' if these are the only operations
which you did while in debug.)


DOS 3.1

Several months ago I also went through this process on DOS 3.1 because
my manual does not have anything I could find about switches to expand 
the environment!!

I cursed Microsoft for not providing a mechanism (so I thought) to do this
especially when I discovered that the size for the environment was no longer
hard coded as it had been in MS-DOS 2.x. My curses now are redirected
toward IBM for not documenting the feature in their manuals.


Jim Vallino
ihnp4!princeton!siemens!jrv
Technical Details
Message-ID: <23900005@siemens.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!princeton!siemens!jrv
References: <1107@decwrl.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: $Revision: 1.6.2.14 $; site siemens.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!princeton!siemens!jrv
From: jrv@siemens.UUCP
Newsgroups: net.micro.pc
Subject: Re: MS-DOS Environment Size
Message-ID: <23900005@siemens.UUCP>
Date: Mon, 17-Feb-86 11:01:00 EST
Article-I.D.: siemens.23900005
Posted: Mon Feb 17 11:01:00 1986
Date-Received: Wed, 19-Feb-86 00:53:56 EST
References: <1107@decwrl.UUCP>
Lines: 55
Nf-ID: #R:decwrl:-110700:siemens:23900005:000:1702
Nf-From: siemens!jrv    Feb 17 11:01:00 1986