I'm newbie to ASM, i want to know how to store value in eax to a variable.
Example :
After using szLen to get a lenght of a zero terminated string, then the result value return to eax, i want to store it (The value in eax) to one variable to use in a future.

I've used:
mov MyVar,eax
but not work.

Sorry for my stupid question. :tongue:

:stupid:
Posted on 2004-06-17 10:44:35 by neverending
hm, "it does not work" - which error does masm give?

There's a couple of things to consider. First, masm is case sensitive - "MyVar" is different from "myvar". Second, you need to declare the variable before you can use it - put a ".data" or ".data?" section before your code, and do "MyData DWORD 0".
Posted on 2004-06-17 10:56:59 by f0dder
Make sure that MyVar has first been defined somewhere before you attempt to modify its content.
MASM doesn't understand "forwards references" to variables.
Posted on 2004-06-17 11:03:51 by Homer