Could somebody point me in the "right" direction regarding linking asm with VS .net?
I've a simple function in asm as follows:
global _addme
_addme:
push ebp
mov ebp, esp
; add
mov eax, [ebp+8]
add eax, [ebp+12]
mov esp, ebp
pop ebp
ret
and compiling using nasm as follows:
nasm -f obj -o addme.obj addme.asm
Then (in my .cpp)
extern "C" {
int addme(int, int);
};
and calling it
val = addme(1,1)
It is linked etc. when I build the project but it seems the function never returns (or doing something really wrong as the xbox just hangs after the call)...
I don't have debug kit/environment setup (yet) so can't really do any meaningful debugging...