From: anonymous c. <nas...@us...> - 2014-10-12 02:47:44
|
>> You mean like MASM's EXTERNDEF? >> >> http://msdn.microsoft.com/en-us/library/91sxd44w.aspx > > To make it clear, here is an example: > > myfunc.inc: > > %define MY_FUNC_FLAG_A 0x0001 > %define MY_FUNC_FLAG_B 0x0002 > [...] > > ; myfunc(param1, param2) : result > ; this function does something and returns a value of it > [extern myfunc] > > > myfunc.asm: > %include 'include/myfunc.inc' > [global myfunc] > > section .code > > myfunc: > push ebp > mov ebp, esp > mov eax, [ebp+0x08] > test eax, MY_FUNC_FLAG_A > jnz .flagA > [...] > > > otherfile.asm > %include 'include/myfunc.inc' > > section .code > > push 0 > push MY_FUNC_FLAG_A > call myfunc Yup, that's the EXTERNDEF behavior. You should called it that. |