hengck23
asked on
MSVC inline assembler equivalent of address operator "&"?
Dear all,
Why can i get the address of local variables in inline assembler in MSVC?
void func(
int* a,
int b
){
int c;
int* d;
__asm mov eax, addressOf b ?
(in C code , it would be: eax=&c)
}
thank you.
Why can i get the address of local variables in inline assembler in MSVC?
void func(
int* a,
int b
){
int c;
int* d;
__asm mov eax, addressOf b ?
(in C code , it would be: eax=&c)
}
thank you.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
I know about "param-N [ebp + 4+N*4]". I was just wondering is there a MARCO expression for this in MSVC inline assember.
I know about "param-N [ebp + 4+N*4]". I was just wondering is there a MARCO expression for this in MSVC inline assember.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am looking for a MACRO expression. But I guess there is none. I would have to use "lea (to get address)" or ,"mov ... [EBP+ ... ] (to get value)" then.
ASKER
I think "OFFSET" only works in the main function.