asm_dip/toolchain/fasm2/source/libc/ccall.inc

24 lines
313 B
PHP
Raw Normal View History

2024-11-24 21:04:53 -08:00
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 }