Hi Will,

Remember, the search command in debug has the
syntax:
         S begin,end value value value.

In this case, FC has told you the offset of the
difference is D3B5.

When you load filename.com with debug, it is
offset by 100h, so that D3B5 will be D4B5.

If the file is an .EXE rather than .COM, then
the offset may be harder to nail down, but you
can get around this by temporarily renaming them
to newfile.bin and oldfile.bin (or whatever).

However, if you load the file with debug and
say   S D000,FFFF 90 90 90   then debug will
begin searching at D000 through FFFF looking
for 90h 90h 90h.  When it finds this string,
it will output the location(s) of the place(s)
where such a string starts, e.g. let's say
you load the file, and the segment is 1FD0,
with a starting offset of 0100, which is
written 1FD0:0100.  When debug locates your
string, it will output a line like this:
1FD0:D4B5  and if you dump this location, you
should see your bytes.

Let us know how this works for you.


~~ Garry Hamilton
~~ [EMAIL PROTECTED]



----- Original Message -----
From: "Will Baldwin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 22, 2004 6:47 PM
Subject: [SURVPC] Help with FC.exe and Debug.exe


> I ran FC /b newfile oldfile, and got the following:
>
> Comparing files newfile and oldfile
> 0000D3B5: 74 90
> 0000D3B6: 58 90
> 0000D3B7: 72 90
> 0000D3B8: E5 90
>
> Then, I wanted to use debug.exe to examine that area which I assumed
consists of
> 4 contiguous bytes where newfile has the string '74 58 72 E5' and oldfile
has
> '90 90 90 90'.
>
> But when I tried to use debug.exe's search command (s range bytes) to find
> either string, I come up with no results with either newfile or oldfile.
Am I
> misinterpreting the FC output or not using debug correctly?  Newfile and
oldfile
> are MSDOS programs, and I'm using debug.exe in a DOS box of Win98SE.
>
> I'm not up on 86 assembly language.  what I want is to replicate that
change to
> a third old program which was written the same way.  Years ago, I used
debug.exe
> successfully to make minor changes to other MS-DOS programs, but it was a
long
> time ago, and I did it on an XT.
>
> The 3 files are pretty small.  if someone had the time and inclination,
I'd
> happily let them look at them.
>
> Thanks.
>
> --
> http://my.voyager.net/~wb/Products/ <-- Home page of Horizon Investment
Analyst
> http://www.geocities.com/pwb_1/Products/ <-- Alternate Horizon Investment
> Analyst site
> http://mywebpage.netscape.com/baldwinwh/DOSPgms/DOSPgms.html <-- MS-DOS
programs
> & utilities
>

Reply via email to