源文件如下(完全的):
#include <stdio.h>
int main()
{
int i,dirc,place;
i=12345;
dirc=0;
place=2;
asm mov cx,word ptr place;
asm mov ax,dirc;
asm cmp ax,1;
asm jne right;
asm rol i,cl;
asm jmp rnd;
right:
asm ror i,cl;
rnd:
printf("%d/n",&i);
return 0;
}
编译和错误信息:
gcc -o a test.c
test.c: In function `main':
test.c:9: parse error before `mov'
test.c:16: parse error before `ror'