【发布时间】:2013-11-14 10:36:33
【问题描述】:
#include <stdio.h>
int main ()
{
int a = 0 ;
/*How can I write it on gcc*/
__asm {
mov a, 2 ;
add a, 4 ;
}
printf ("%d\n",a );
return 0 ;
}
这是VS2012的一些汇编代码,在gcc上怎么写?
【问题讨论】:
-
通过向谷歌询问数百万样本中的任何一个并复制样式。我在 google 中输入了“gcc inline asm”,得到了 19,400,000 个结果。也许你需要再努力一点?