kolibrios-fun/programs/develop/fasm/1.73/kolibri/macro/proc.inc
Kirill Lipatov (Leency) 0e67df68e0 FASM 1.73.23 by Prohor Nikiforov
git-svn-id: svn://kolibrios.org@7836 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-04-28 23:24:56 +00:00

48 lines
911 B
PHP

; Macroinstructions for calling procedures (without defining)
macro stdcall proc,[arg] ; directly call STDCALL procedure
{ common
if ~ arg eq
reverse
pushd arg
common
end if
call proc }
macro invoke proc,[arg] ; indirectly call STDCALL procedure
{ common
if ~ arg eq
reverse
pushd arg
common
end if
call [proc] }
macro ccall proc,[arg] ; directly call CDECL procedure
{ common
size@ccall = 0
if ~ arg eq
reverse
pushd arg
size@ccall = size@ccall+4
common
end if
call proc
if size@ccall
add esp,size@ccall
end if }
macro cinvoke proc,[arg] ; indirectly call CDECL procedure
{ common
size@ccall = 0
if ~ arg eq
reverse
pushd arg
size@ccall = size@ccall+4
common
end if
call [proc]
if size@ccall
add esp,size@ccall
end if }