-1

What is the difference between:

MOV SI,WORD PTR DS:[ESI+0D]

CMP SI,1388

and

CMP WORD PTR DS:[ESI+0d],1388 
1

I believe they are the same for the given assembly snippet, but in the first snippet, the value of ESI+0D is saved in SI and could be later used again without loading it from the memory additional time.

2
  • also think so, but because i am very new to ollydbg i asked it here, because SI never used any futher down the code, so i wondered why developers (i am editing game 1998 year) choose to save value in SI rather than use straight compare. Apr 21 '20 at 10:28
  • I believe it was the compiler's choice and the developer's choice. Apr 21 '20 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.