The following will compile your cpp code but will not link it:
g++ -c x2.oThe following will assemble your asm code but will not link it:
yasm -f elf64 x1.asm -o x1.oThen, you need to link them:
g++ -g -o execName x1.o x2.oCalling assembly from C++:
extern "C" void stats(int* x, bool* y);Notice how you need to specify amount of parameters, return type, and type of parameters, unlike when you code in assemble.
Calling assembly from assembly:
extern stats
; some code
call stats