DSP中C中调用asm子函数示例
[ 2005-12-3 13:58:12 | By: kassey ]
/*************************************************************************
NOTE:TMS320LF2407
*************************************************************************/
/********************************************
File:test.c
Description:主函数
Author: kassey@126.com ,Dec,2th,2005
********************************************/
#i nclude "lf2407.h"
void main()
{
SYSINIT();//此处调用
while(1);
}
/********************************************
File:testasm.asm
Description:主函数
Author: kassey@126.com ,Dec,2th,2005
********************************************/
.ref _SYSINIT; /*必须声明引用*/
.include "../head/lf2407.inc" /* for asm */
.text
_SYSINIT:
SETC INTM;
CLRC SXM;
CLRC OVM;
CLRC CNF;
LDP #0e0h;
SPLK #81feH,SCSR1;
SPLK #0e8H,WDCR;
LDP #0;
SPLK #0,IMR;
SPLK #0ffffh,IFR;
ret;