向大侠求助!c++内嵌汇编!
小弟愚昧无知,以为直接把汇编代码内嵌到c++中就可以运行了...
- C/C++ code
#include <iostream>using namespace std;int main(){ return 0;}
在该程序上如何做修改,可以做出输出hello world!
[解决办法]
- C/C++ code
#include <iostream>using namespace std;int main(){ char *szHello = "Hello world!"; _asm { push szHello call printf } return 0;}
[解决办法]
- Assembly code
__asm push szHello__asm call printf__asm add esp, 4