asm_dip/toolchain/fasm2/source/libc/ccall.inc
2024-11-25 00:04:53 -05:00

24 lines
313 B
PHP

macro ccall proc*,[arg]
{
common
local size,count
mov ebp,esp
if size
sub esp,size
end if
and esp,0FFFFFFF0h
count = 0
if ~ arg eq
forward
mov dword [esp+count*4],arg
count = count + 1
common
end if
size = count*4
call proc
mov esp,ebp
}
macro cinvoke proc*,arg& { ccall [proc],arg }