Alex
2004-08-30 04:26:45 UTC
Hi guys
strange problem here..
here is the scenario, I am trying to compare two strings, my routine
is searching thru the root directory of a floppydisk to find a filename.
string1 db 'KERNEL32SYS' ;same format of name in root dir table
I have ds:esi pointing to string1 and es:edi and pointing to a buffer which
contains the string I am comparing against (string is always 11 characters
long)
(8 charfilename+3byte ext), i find i have to set ecx to 12 for it to check
the whole
string (using repe cmpsb). If i set it to 11, it seems to miss checking the
last character.
I cant understand why though? shouldnt mov ecx,11 be alright?
Alex.
strange problem here..
here is the scenario, I am trying to compare two strings, my routine
is searching thru the root directory of a floppydisk to find a filename.
string1 db 'KERNEL32SYS' ;same format of name in root dir table
I have ds:esi pointing to string1 and es:edi and pointing to a buffer which
contains the string I am comparing against (string is always 11 characters
long)
(8 charfilename+3byte ext), i find i have to set ecx to 12 for it to check
the whole
string (using repe cmpsb). If i set it to 11, it seems to miss checking the
last character.
I cant understand why though? shouldnt mov ecx,11 be alright?
Alex.