You will have to let visual studio automatically "convert" them to the new project format, but I just tried it with the PRIMESSTEP2 example and it worked.
All you need is a function prototype like:
void sieve(void); // prototype for Sieve of Eratosthenes function
And then you can implement them in asm and they will link together. You return values by placing them in the EAX register and it will come through as a return value in C / C++.
发布评论
评论(2)
所有这些示例都有您需要的内容:
http: //msdn.microsoft.com/en-us/library/t13a3526%28v=VS.80%29.aspx
您必须让 Visual Studio 自动“转换”它们转换为新的项目格式,但我只是用 PRIMESTEP2 示例进行了尝试,并且它有效。
您所需要的只是一个函数原型,例如:
然后您可以在 asm 中实现它们,它们将链接在一起。您可以通过将值放入 EAX 寄存器来返回值,它将作为 C / C++ 中的返回值出现。
All of these samples have what you need:
http://msdn.microsoft.com/en-us/library/t13a3526%28v=VS.80%29.aspx
You will have to let visual studio automatically "convert" them to the new project format, but I just tried it with the PRIMESSTEP2 example and it worked.
All you need is a function prototype like:
And then you can implement them in asm and they will link together. You return values by placing them in the EAX register and it will come through as a return value in C / C++.
使用内联汇编器不是更容易吗?
Wouldn't it be easier to just use inline assembler?