I want to link an assembly file that contains just one function with an object file generated from. I would like to know how to create .obj files in MASM and I also need to know how to create such a function. Is this sufficient for a function that adds two ints together?
intadd PROC int1:DWORD int2:DWORD
mov eax, int1
mov ebx, int2
add eax, ebx
intadd ENDP
If I create and link the obj files, can I do
int x = intadd(1,1);
to receive 2?
To sum it up: I need to know how to create .obj files from MASM if they contain a Macro as above and how to call the macros from a HLL if my code doesn't work.