This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

如何在.c文件中,嵌入汇编代码

Other Parts Discussed in Thread: TMS320C6748

大家好,所用平台是TMS320c6748,

目前想在一个c文件中加入汇编指令,使用如下方式报错,请大家帮忙指点下

__asm

{

}//这种方式报错

//这种也报错

#asm

#endasm

//这种也报错

#pragma asm

#pragma endasm

我想实现的代码如下

for(i=0;i<100;i++)

{

      sum += m * n;

}

这是原本的c代码,现在我想把这段c代码换成汇编实现,请我我的方法是哪里错误了?

谢谢