The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: ragdog on November 17, 2008, 12:56:17 PM

Title: Register [SOLVED]
Post by: ragdog on November 17, 2008, 12:56:17 PM
Hi

Why can i not use a string to a register for cmp

example:


xyz proc lpszstring:DWORD

   mov  esi,[lpszstring]
   mov esi,[esi]            <<<<<<<< this was the error
   ...
   ..
   .
   cmp  dword ptr [edi],esi
   jne  @Out


I have debug this is the routine by cmp if esi empty, i use only this two esi register in my routine and a edi for parsing a string

This works:  cmp  dword ptr [edi],"DCBA"
                   jne  @Out

Can your tell me this what is wrong


greets