How to mov EAX, &func?

deadalnix deadalnix at gmail.com
Tue May 15 14:27:33 PDT 2012


Le 15/05/2012 21:33, Mehrdad a écrit :
> How do get the address of a function in naked assembly code?
>
> void foo()
> {
> asm
> {
> naked;
> mov EAX, &foo;
> }
> }
>
> This doesn't work...

As it is naked,

mov EAX, EIP;

is enough.


More information about the Digitalmars-d mailing list