Dealing here with DOS 6.22, COMMAND.COM   54645  05-31-94  6:22

just for the change in environment space from 256bytes.

After copying your CCom to CCOM.622 (as a precaution), take a look into
it with a hex editor (HEXED is just fine).  Do a Hex search using:
8D211000.  That should leave the cursor on the byte BA at address: 1679.

Now move two bytes left, to 1677 and change that 10 to 20 for 512 bytes
or to 40 for 1024 bytes of environment.  If you use DEBUG instead, with
it's offset of 0100, that address becomes 1777.  Then save the change
and your new environment size will be in effect even in secondary shells
(following reboot).

Above by Bat Lang
BATPOWER 6-10-95
NetMail at 1:382/1201, or Internet: bat@infomail.com

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

or by using DEBUG using a small batch generated script, from Gerry Pereja:

 @echo off
 :: THIS ONLY WORKS FOR THE COMMAND.COM as shown above (ver 6.22)
 :: make changes to C: and CD\DOS as needed
 c:
 cd\dos
 if exist command.pat echo It seems you have already patched this version!
 echo.
 if exist command.pat type command.pat
 if exist command.pat goto end
 copy command.com command.256 >nul
 echo Patched COMMAND.COM on date shown on next line:>command.pat
 ver|date|find "Curr">>command.pat
 echo e1777 40>>command.pat
 echo w>>command.pat
 echo q>>command.pat
 attrib -r -h -s command.com
 debug command.com <command.pat
 echo.
 echo Done.  COMMAND.COM now patched for default 1024-byte env.
 echo Original saved as COMMAND.256  (256-byte env.)
 :end

 Gerry

 P.S.:  The string to look for (for example, using Buerg's List in hex
 mode:

     LIST.COM COMMAND.COM /H

 is '001670'  21 5A 00 C7 06 8D 21 40 00 BA A4 AF B1 04 D3 EA

 Note the "8D 21 40 00" which is "8D 21 10 00" in the unpatched
 COMMAND.COM.  Also note that when using DEBUG, the address as reported
 by LIST must be bumped up by hex 0100, from 001677 to 001777.  For 512-
 byte environment, use 20 instead of 40.

 Good luck.  DO NOT PATCH YOUR ONLY COPY of C.c. <g>


 * OLX 2.1 TD * G. Pareja * Vancouver * B.C. * Canada *

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

Now for a similar patch for default  COLOR   from Chan Shippy

  Msg#: 5507                                         Date: 05-27-95  17:50
  From: J.r. Brimmer Iii                             Read: Yes    Replied: No
    To: Chan Shippy                                  Mark:
  Subj: Command.com Colors

CS=>************************  FOR MSDOS  6.22  ***************************

CS=>DEBUG COMMAND.COM
CS=>-U 4CCC
CS=>????:4CCC 33C0          XOR     AX,AX
CS=>????:4CCE 8BC8          MOV     CX,AX
CS=>????:4CD0 B406          MOV     AH,06
CS=>????:4CD2 B702          MOV     BH,07    ; 07 is white on black for CLS
CS=>????:4CD4 32DB          XOR     BL,BL    ; the left  digit is background
CS=>????:4CD6 CD10          INT     10       ; the right digit is foreground

CS=>-E 4CD2 B7 bf                            ;where b is background color
CS=>-W                                       ;      f is foreground color
CS=>-Q

CS=>for example   -E 4CD2 B7 02--foreground color 0-F (GREEN)
CS=>                         |
CS=>                         background color 0-7 (BLACK)

CS=>                         0 BLACK              8 GRAY
CS=>                         1 BLUE               9 LIGHT BLUE
CS=>                         2 GREEN              A LIGHT GREEN
CS=>                         3 AQUA               B LIGHT AQUA
CS=>                         4 RED                C LIGHT RED
CS=>                         5 VIOLET             D LIGHT VIOLET
CS=>                         6 BROWN              E YELLOW
CS=>                         7 WHITE              F BRIGHT WHITE

CS=>Now your .BAT files will run in color.  You have to do a CLS after
CS=>bootup to make your new colors effective tho.

 I have tested it (from memory) but I use Ansi, and that undid all the good
 work!
 Perhaps you didn't issue a CLS after patching?

 Regards                    __!__
               Mic       -----o-----
                             " "
 ! Origin: Melbourne PC User Group  +61-3-699-6788 (3:632/309)

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

Dealing with CHKDSK.EXE (to remove the obnoxious three lines about
SCANDISK) from Jerry Hodges/Bat Lang

Since the CHKDSK.EXE  12241  05/31/94  06:22:00
as contained in MS-DOS 6.22 has been compressed with PKLITE v1.15, it is
first neccessary to uncompress it using PKLITE v1.15 or later.  After
uncompressing, it should be Expanded Size: 21121 bytes.

Load it into a Hex editor (HEXED used) and locate these two hex groups,
which are on adjacent lines.  If your hex editor does not index the
addresses (like HEXED, which has an 'odometer' like readout), then a hex
search for E8F9047209 should find the first string.  The second string
is on the line below.  Make the changes as indicated and save and exit.

00003A38: E8 -> 90
00003A39: F9 -> 90
00003A3A: 04 -> 90
00003A3B: 72 -> 90
00003A3C: 09 -> F8

00003A46: E8 -> 90
00003A47: CE -> 90
00003A48: 04 -> 90

After using PKLITE for the recompression (using the -c switch), results
in your patched CHKDSK New Size: 12320 bytes.
Since it will no longer have the correct date/time, I recommend you
'touch' them back to 05-31-94 16:22:00 (assumes a 24hr-time
COUNTRY.SYS, patch below).  This 'schtick' will enable you to easily
spot any patched DOS 6.22 files in your DOS dir by the leading '1'.

For those who would rather do the editing with DEBUG, just a reminder
that the above addresses will require first being increased by 100h, IAW
DOS DEBUG 'offset' protocol.  Good Modeming!  /\oo/\

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

Dealing with the COUNTRY.SYS patch to alter the DOS 12hr time using 'a'
and 'p' to 24hr time, thanks to John Orlay of OZ for this patch.
Quoting from him:

 JO> The patches are:
 JO>
 JO> COUNTRY.SYS
 JO> =====================
 JO>
 JO>                 v6.22         v6.22
 JO>                 12 hour       24 hour
 JO>                 (original)    (patched)
 JO>
 JO> at 000033DAh       2F  ->        2D
 JO> at 000033E0h       00  ->        01
 JO>
 JO> If patching with DEBUG one must of course add 100h to the addresses.
 JO>
 JO> One will also need to include something like the following line
 JO> in CONFIG.SYS :
 JO>
 JO> COUNTRY=1,,C:\DOS\COUNTRY.SYS

Thanks a meg, John.  That's exactly the info I was seeking.  After
getting used to the 24hr thing, I really missed it back with the a & p
Hey!  That used to be a big supermarket in the US.  {^; Good Modeming!
/\oo/\

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