flat assembler
Message board for the users of flat assembler.
Index
> Projects and Ideas > [little IDEA] Name decoration. |
Author |
|
max 20 May 2009, 09:44
Hi, All.
Sorry for my english FASM have "public" directive for COFF. we can write public MyProc as 'xxxMyProc' and link it to our C code as xxxMyProc function int xxxMyProc(int arg1); but if function is __cdecl we must have _MyProc name if function is __stdcall we must have _MyProc@8 name (if proc with 2 DWORD args) if function is __fastcall we must have @MyProc@8 name (if proc with 2 DWORD args) and FASM can do it. something like this. for public MyProc as __cdecl generate equivalent public MyProc as '_MyProc' for public MyProc as __stdcall(2) ; 2 - 2 args generate equivalent public MyProc as '_MyProc@8' ; 8 - 2*4 bytes (for x86-32) for public MyProc as __fastcall(2) ; 2 - 2 args generate equivalent public MyProc as '@MyProc@8' ; 8 - 2*4 bytes (for x86-32) Name decoration rules: http://msdn.microsoft.com/en-us/library/deaxefa7.aspx Thanks. Max |
|||
20 May 2009, 09:44 |
|
vid 20 May 2009, 11:26
you can easily extend public to very similar functionality with macro
|
|||
20 May 2009, 11:26 |
|
guignol 03 Jun 2009, 15:11
yeah
a perfect match is, gently speaking, tricky |
|||
03 Jun 2009, 15:11 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.