flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
IceStudent 08 Oct 2006, 12:44
Hi!
I improved invoke macro for allowing calls all functions directly (without selecting ccall/stdcall/cinvoke calls for each function). Now you can use it simpler: Code: ... std header include 'invokeex.inc' ; extended invoke ; mark external cdecl functions as ccall __cdecl printf,wsprintf ; or you can mark local functions, e.g __cdecl test4 ; but you can't mark as cdecl functions, that are declared as stdcall ;__cdecl test5 __start: ; calling functions only by invoke invoke test1,1,2 ; stdcall invoke test2 ; stdcall invoke test3,1,4 ; cdecl invoke test4,5 ; marked as cdecl invoke test5,5 ; forced stdcall invoke wsprintf,buf,fmt,eax ; imported, marked as cdecl invoke ExitProcess,0 ; imported, stdcall by default ; stdcall by default proc test1 a,b local var dd ? mov eax,[a] add eax,[b] mov [var],eax local var2 dd ? mov [var2],eax ret endp proc test2 nop ret endp proc test3 c a,b mov eax,[a] add eax,[b] ret endp proc test6 stdcall a,b mov eax,[a] sub eax,[b] not eax ret endp ; setted as stdcall proc by MARKCPROC proc test4 a mov eax,[a] xor eax,0xADADADAD invoke test6,eax,0 ret endp ; declared as stdcall proc test5 stdcall a ret endp
|
|||||||||||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.