User forums > General (but related to Code::Blocks)
AT&T asm help
(1/1)
airc:
hi all
i've the following function and i want access to its parametres through the ebp register but the function always return 0
--- Code: ---int getParam(int x)
{
int result;
asm("mov 8(%ebp),%eax"); // copy x into eax
asm("mov %eax, -4(%ebp)"); // copy eax into result
return result;
}
--- End code ---
i konw its not CB related , but i hope to get some help
thanks in advance
oBFusCATed:
What do you expect to get as an answer other then a locked/deleted topic?
Search the internet or the manual of you compiler how to do this.
Navigation
[0] Message Index
Go to full version