[comp.sys.ibm.pc] Echo off patches.

mds7958@ritcv.UUCP (Mark Sicignano) (04/01/88)

I think the version of command.com that Leading Edge uses is different
than the normal version, because when I went to apply the patches for
echo off as the default, I could not locate the right values at the
offsets given.

when I boot up I get this message:

	MS-DOS version 3.10 (C)Copyright 1981, 1985 Microsoft Corp.

and command.com tells me this:

	Command v. 3.10 (C)Copyright Microsoft Corp 1981, 1985

This is the listing in the directory:

	COMMAND  COM    22677   5-15-85  12:00a

Would anybody have patches for my version?

Thanks,

-mark
---
{rochester | ihnp4!tropix}!ritcv!mds7958
(716) 359-4050

grandi@noao.arizona.edu (Steve Grandi) (04/02/88)

In article <325@ritcv.UUCP> mds7958@ritcv.UUCP (Mark Sicignano) writes:
>I think the version of command.com that Leading Edge uses is different
>than the normal version, because when I went to apply the patches for
>echo off as the default, I could not locate the right values at the
>offsets given.

What you need to do to make the default behavior for batch files to be echo
off is to find the following section of code in your command.com and patch
the byte that occurs at the location that corresponds to 1B2C in this
listing from 01 to 00. 

4AE7:1B20 06		PUSH	ES
4AE7:1B21 E8461A	CALL	356A
4AE7:1B24 E86AFF	CALL	1A91
4AE7:1B27 26		ES:
4AE7:1B28 A0FC0A	MOV	AL,[0AFC]
4AE7:1B2B 2401		AND	AL,01
4AE7:1B2D 50		PUSH	AX
4AE7:1B2E E89600	CALL	1BC7
4AE7:1B31 BE7B3D	MOV	SI,3D7B
4AE7:1B34 E88E15	CALL	30C5
4AE7:1B37 8BD9		MOV	BX,CX
4AE7:1B39 81C3B800	ADD	BX,00B8
4AE7:1B3D 51		PUSH	CX
4AE7:1B3E B104		MOV	CL,04

So fire up debug on a copy of command.com and search for the hex string
81C3B800 (corresponding to the the ADD BX,00B8 command).  A debug command
to do the deed might be "SCS:100 2000 81 C3 B8 00".  A value of 1AC9 might be
returned.  Then do "U 1AB0" which should reproduce the above listing, and
patch location 1ABC.  In the 3 or 4 versions of MS-DOS 3.x that I have
patched, I have had no problem locating the proper location. 

Unfortunately, I have not seen the "context" for the echo off patch for
autoexec.bat.  Could anyone who has successfully patched location 115E in a
"stock" PC-DOS 3.2 to 2 to turn off echoing in autoexec.bat please post the
results of a "U 114C" command in debug?
-- 
Steve Grandi, National Optical Astronomy Observatories, Tucson AZ, 602-325-9228
UUCP: {arizona,decvax,hao,ihnp4}!noao!grandi  or  uunet!noao.arizona.edu!grandi 
Internet: grandi@noao.arizona.edu    SPAN/HEPNET: 5356::GRANDI or DRACO::GRANDI