还有问题(CAN自测试):
这是我的ASM文件,大家看看缺少什么?
.title \"test.asm\"
.ref _c_int0
.ref _GRIS5
.ref _nothing
.sect \".vectors\"
RESET B _c_int0
INT1 B _nothing
INT2 B _nothing
INT3 B _nothing
INT4 B _nothing
INT5 B _GRIS5
INT6 B _nothing
_c_int 中这段程序的原代码如下,无非是一个循环.
****************************************************************************
* READ INIT RECORD HEADER
* AN INIT RECORD WITH A ZERO LENGTH TERMINATES LIST
****************************************************************************
loop:
TBLR *+ ; read length
ADDK 1
TBLR * ; read address
LAR AR2,*- ; load variable address into ar2
LAR AR3,*,AR3 ; load count into ar3
BANZ copy,*-,AR2 ; check for end of table
****************************************************************************
* AT END OF LIST, RETURN TO CALLER
****************************************************************************
LARP AR1
SBRK 2 ; deallocate locals
RET ; return to _c_int0
****************************************************************************
* PERFORM THE COPY OF DATA FROM PROGRAM TO DATA
****************************************************************************
copy:
ADDK 1 ; increment pointer to data
TBLR *+,AR3 ; copy data from program to variable
BANZ copy,*-,AR2 ; until count is zero
ADDK 1 ; point to beginning of next record
B loop,AR0 ; go process next record
.endif ; .tms32025 | .tms3202xx
****************************************************************************
* C5x VERSION
****************************************************************************
.if .tms32050
LALK cinit ; load accumulator with base of table
LDPK 0 ; set page to 0 for AR2 ==> BRCR
****************************************************************************
* READ INIT RECORD HEADER
* AN INIT RECORD WITH A ZERO LENGTH TERMINATES LIST
****************************************************************************
loop:
TBLR * ; read length
ADDK 1
LAR AR2,*,AR2 ; into AR2
BANZ continue,*-,AR1 ; continue if not zero, decrement
****************************************************************************
* AT END OF LIST, RETURN TO CALLER
****************************************************************************
RET
****************************************************************************
* PERFORM THE COPY OF DATA FROM PROGRAM TO DATA
****************************************************************************
RPTB copy - 1
TBLR *+
ADDK 1
NOP
copy:
B loop,AR1 ; go process next record