最近在学着用dsp2000编写C程序,想在C语言中调用汇编语句段,例如_FUNCTION__U16
在fun.asm文件中:
.include "fun.inc"
.def _FUNCTION_U16
_FUNCTION_U16:
MOVU ACC,@AA
RPT #15
||SUBCU ACC,@BB
MOV @CC,ACC
LRETR
........
想在fun.inc文件中定义:
AA. set AR7
BB. set AR6
CC. set AR5
.....
想在C语言中引用后缀名inc文件
#include "fun.inc"
long bb;
long cc;
void functiontest()
{
AA = 2;
BB = 3;
FUNCTION_U16( );
cc = CC;
}
......
编译的时候,提示fun.inc文件有“error: this declaration has no storage class or type specifier。error: unrecognized token”
请问怎么解决编译错误?
多谢多谢!