C++ 中嵌入汇编


#include<iostream> using namespace std; int main(){ int a,b; while(scanf("%d%d",&a,&b)==2){ int *c=&a; __asm{ mov eax,c; mov eax,[eax]; mov ebx,b; lea eax,[eax+ebx]; mov a,eax; } cout<<a<<endl; } return 0; }
C++ 中嵌入汇编
#include<iostream> using namespace std; int main(){ int a,b; while(scanf("%d%d",&a,&b)==2){ int *c=&a; __asm{ mov eax,c; mov eax,[eax]; mov ebx,b; lea eax,[eax+ebx]; mov a,eax; } cout<<a<<endl; } return 0; }
转载于:https://www.cnblogs.com/tangcong/archive/2012/08/19/2646670.html