VC内联汇编和GCC内联汇编的语法区别 5月 24 2016 编程 几秒 读完 (约 53 字) VC: 12345678910111213141516#include <stdio.h>main(){ int a = 1; int b = 2; int c; __asm{ mov eax,a mov ebx,b mov ecx,1h add eax,ebx mov c,ecx } printf("%x\n", c);} GCC: 1234567891011121314#include <stdio.h>main(){ int a = 1; int b = 2; int c; asm( "add %2,%0" //1 :"=g"(c) //2 :"0"(a),"g"(b) //3 :"memory" //4 ); printf("%x\n", c);} #编程 写给迷茫的朋友 反汇编技术笔记-基础知识