How to mov EAX, &func?

ponce spam at spam.org
Tue May 15 14:39:35 PDT 2012


Le 15/05/2012 23:27, deadalnix a écrit :
>
> mov EAX, EIP;
>
> is enough.

I think this is illegal in assembly, try to call a label in your 
function then pop.

void* selfAddress() // actually tested
{
     asm
     {
         naked;
         call my_label;
         my_label:
         pop EAX;
         sub EAX, 5;
         ret;
     }
}



More information about the Digitalmars-d mailing list