repe cmpsb instruction

  • Follow


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.


0
Reply Alex 8/29/2004 5:42:40 PM


0 Replies
771 Views

(page loaded in 0.024 seconds)

Similiar Articles:






7/21/2012 6:00:43 PM


Reply: