flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Just a little question about local variables

Author
Thread Post new topic Reply to topic
Igor1024



Joined: 12 Dec 2010
Posts: 19
Igor1024 09 Sep 2011, 08:24
Hi all.
I've been using fasm for a long time and never got use recursion. But now I've had this problem. There might be some topics like this, I've failed to find them, sorry, if it's so.

Code:
proc SomeProc, var1
;declare local variable (it's 1 only cause that's example)
local find_p dd ?
.....
mov edi,find_p;fails
lea edi,find_p;fails, but I need just offset of find_p
.....
endp 
    

So, how to use these local variables?

_________________
The God is real,unless he is declared as integer.
Post 09 Sep 2011, 08:24
View user's profile Send private message Send e-mail Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20343
Location: In your JS exploiting you and your system
revolution 09 Sep 2011, 08:41
Use the brackets:
Code:
mov edi,[find_p]
lea edi,[find_p]    
Post 09 Sep 2011, 08:41
View user's profile Send private message Visit poster's website Reply with quote
Igor1024



Joined: 12 Dec 2010
Posts: 19
Igor1024 09 Sep 2011, 09:22
Thanks. Theme can be closed.
Post 09 Sep 2011, 09:22
View user's profile Send private message Send e-mail Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.