I use the proc syntax for my stackframe with local variables like this:
-------------------------------------------
proc test
locals
a rd 1
b rb 1000
endl
MOV EAX,1
MOV [a],EAX
....
-------------------------------------------
but what if I need the address of a local var?
LEA EAX,a
doesn´t work of course. The code I want might be
MOV EAX,EBP
sub EAX,theOffsetOfARelativeToEbpOfCourse
So how do I get the address of local vars (as it is needed often for api calls etc.) without completely throwing out "proc" and "locals" and doing all the stack management by hand?
Please help a newbie here.
Thanks!
WV
|