--------------------------------------------------------------------------

 The following series of patches will allow you to redefine your default
 environment size for IBM PC-DOS 3.30 dated 3-17-87, MS-DOS 3.30 dated 2-2-88,
 MS-DOS 4.01 dated 12-19-88, MS-DOS 5.00 dated 3-22-91 or 4-9-91, MS-DOS 6.00
 dated 3-10-93, and IBM DOS (formerly PC-DOS) 6.10 dated 6-29-93.  KEEP AN
 ORIGINAL COPY OF YOUR COMMAND.COM, A BOOT DISK IS A GOOD IDEA.  USE THE
 FOLLOWING INFORMATION AT YOUR OWN RISK, SOME DEGREE OF PROGRAMMING AND
 TECHNICAL KNOWLEDGE IS REQUIRED AND ASSUMED.

 If you need any assistance, feel free to contact me via Fidonet netmail.
 This first piece of information seems to originate from Matthew Lewis, he
 posted it in the Fidonet BatPower Conference.  (BTW, you can netmail me at
 1:369/11, I will try to reply to all messages, if you don't receive a
 reply in a week or so then you might want to try again, be sure to give
 enough time for the mail to transfer back and forth (two weeks should be
 enough for most places).

 Source: Chad Wagner (1:369/11)

--------------------------------------------------------------------------

 The following patch will work with COMMAND.COM's dated 2-2-88, 12:00am,
 25308 bytes in size, MS-DOS 3.30.  This patch will also work with
 COMMAND.COM's dated 3-17-87, 12:00pm, 25307 bytes in size, IBM PC-DOS 3.30.

 The only difference as far as environment goes is the default is 0Ah which
 is 160 bytes, and the offset is 0DB8h (3,512 decimal, add 0100h if your
 using DEBUG).

 Source: Chad Wagner (1:369/11)

--------------------------------------------------------------------------

 The following patch will work with COMMAND.COM's dated 12-19-88, 12:00am,
 37557 bytes in size, MS-DOS 4.01.
 
 The default environment size is 0Ah which is 160 bytes, guess it changed
 with DOS 5.00?, and the offset is 1B2Ah (6,954 decimal, add 0100h if your
 using DEBUG).

 Source: Chad Wagner (1:369/11)
 
--------------------------------------------------------------------------

 First, make sure you have the same version of COMMAND.COM that
 I've applied the patch to.  This is the version included with
 the MS-DOS 5.0 Upgrade, and is 47845 bytes long, dated 04-09-91,
 at 5:00 am.

 Next, make sure you have a copy of the original COMMAND.COM
 safely put away on a bootable diskette, just in case something
 should go wrong.

 Now you're ready to use a sector editor, such as NU, to change a
 single byte in the copy of COMMAND.COM that resides in the root
 directory of your hard disk.

 The byte at offset 1566h (5,478 decimal) represents the number
 of 16 byte paragraphs to be set aside for the master
 environment.  This byte is normally 10h, which gives you an
 environment size of 256 bytes.  You can change it to whatever
 you want to.  Some examples:

            01h =   16 bytes
            10h =  256 bytes (default)
            20h =  512 bytes
            30h =  768 bytes
            40h = 1024 bytes
            60h = 1536 bytes
            80h = 2048 bytes
            FFh = 4080 bytes

 If you're using DEBUG to make the patch, you'll have to specify
 address 1666h.

 After making this change, you can still use the SHELL statement
 in CONFIG.SYS if you wish to have an environment size other than
 the new default you've just set COMMAND.COM to, but without the
 SHELL statement, you'll have the new default size.
 
 Source: Matthew Lewis (1:134/32)

--------------------------------------------------------------------------

 The above patch will also work with COMMAND.COM's dated 3-22-91, 5:10am,
 47845 bytes in size, MS-DOS 5.0.
 
 Instead of this address being a byte, it's actually a word (offset 1566 to 
 1567h).  You can specify all the way up to FFFFh, which would come out to
 1,048,560 (a little shy of 1MB), but it probably wouldn't work, considering
 640K boundary, and the upper memory contains video, ROM-BIOS, etc.  Be sure
 to enter the value in little endian format, so if you want let's say 4K for
 an environment size, it is 0100h, you would enter 00h at 1566h and 01h at
 1567h (add 0100h if your using DEBUG).

 Source: Chad Wagner (1:369/11)

--------------------------------------------------------------------------

 The following patch will work with COMMAND.COM's dated 3-10-93, 6:00am,
 52925 bytes in size, MS-DOS 6.00.
 
 The default environment size is 10h which is 256 bytes, and the offset is
 1667h (5,735 decimal, add 0100h if your using DEBUG).
 
 Source: Chad Wagner (1:369/11)

--------------------------------------------------------------------------

 The following patch will work with COMMAND.COM's dated 6-29-93, 12:00pm,
 52589 bytes in size, IBM DOS (formerly PC-DOS) 6.10.

 The default environment size is 10h which is 256 bytes, and the offset is
 16A7h (5,799 decimal, add 0100h if your using DEBUG).

 Source: Chad Wagner (1:369/11)

--------------------------------------------------------------------------

 The following patch will work with COMMAND.COM's dated 9-30-93, 6:20am,
 54619 bytes in size, MS-DOS 6.20.  -- Chad Wagner (1:369/11)

 For those of you who have installed the MS-DOS 6.20 upgrade and wish to
 increase the default environment size from 256 bytes to whatever, the offset
 to patch is 1677 hex or 5751 decimal when using a disk editor like Norton's
 Diskedit (DE).  If using DEBUG, the offset would be 1777.

 This byte represents the number of 16 byte paragraphs to allocate to the
 environment, and is normally 10 hex.  Changing it to 40 hex will increase
 the default environment size to 1024 bytes.

 Source: Matthew Lewis (1:134/32)

--------------------------------------------------------------------------
