请教各位高手编译问题(迫切想知道答案,在线等)
[复制链接]
ASM程序如下: .title " add.asm " .def start .mmregs ;预定义的寄存器 .text ;程序区 start: SSBX XF ;XF 置1 CALL Delay ;调用延时程序 RSBX XF ;XF 清0 CALL Delay ;调用延时程序 B start ;跳转到程序开头循环执行 Delay: STM #0x26,AR1 ;循环次数1000 LOOP1: STM #0x55,AR2 ;循环次数5000 LOOP2: BANZ LOOP2,*AR2- ;如果AR2 不等于0,AR2 减1,再判断 BANZ LOOP1,*AR1- ;如果AR1 不等于0,AR1 减1,跳转到LOOP1 RET .end vectors程序: .sect ".vectors" .ref start .align 0x80 RS: BD start STM #128,SP nmi: RETE NOP NOP NOP sint17 .space 4*16 sint18 .space 4*16 sint19 .space 4*16 sint20 .space 4*16 sint21 .space 4*16 sint22 .space 4*16 sint23 .space 4*16 sint24 .space 4*16 sint25 .space 4*16 sint26 .space 4*16 sint27 .space 4*16 sint28 .space 4*16 sint29 .space 4*16 sint30 .space 4*16 int1: RETE NOP NOP NOP int2: RETE NOP NOP NOP tint0: RETE NOP NOP NOP brint0: RETE NOP NOP NOP bxint0: RETE NOP NOP NOP brint1: RETE NOP NOP NOP bxint1: RETE NOP NOP NOP bint3: RETE NOP NOP NOP .end
CMD文件: -stack 0x800 -heap 0x800 MEMORY { PAGE 0:VECT: org=0080h len=0080h PARAM: org=100h len=0F00h PAGE 1:DARAM: org=1000h len=1000h } SECTIONS { .text :> PARAM PAGE 0 .vectors :> VECT PAGE 0 STACK :> DARAM PAGE 1 .bss :> DARAM PAGE 1 .data :> DARAM PAGE 1 } 编译结果:
---------------------------- asm_add.pjt - Debug ---------------------------- "d:\ti_ccs\c5400\cgtools\bin\cl500" -g -q -fr"E:/dsp_exercis/asm_add/Debug" -d"_DEBUG" -@"Debug.lkf" "add.asm" "add.asm", ERROR! at line 1: [E0002] Invalid mnemonic specification .title " add.asm " "add.asm", ERROR! at line 2: [E0300] '_INT0_AD' is not defined in this source file .def _INT0_AD "add.asm", ERROR! at line 3: [E0300] '_HPINT' is not defined in this source file .def _HPINT 3 Assembly Errors, No Assembly Warnings Errors in Source - Assembler Aborted "d:\ti_ccs\c5400\cgtools\bin\cl500" -g -q -fr"E:/dsp_exercis/asm_add/Debug" -d"_DEBUG" -@"Debug.lkf" "vectors.asm" Build Complete, 4 Errors, 0 Warnings, 0 Remarks. ______________________________________________ 疑问: 不知道为什么好象不能识别 .title .def .ref 等伪指令,如果把.title " add.asm " 指令屏蔽,则出现以下结果,还请各位高手指导我这个菜鸟下: ---------------------------- asm_add.pjt - Debug ---------------------------- "d:\ti_ccs\c5400\cgtools\bin\cl500" -g -q -fr"E:/dsp_exercis/asm_add/Debug" -d"_DEBUG" -@"Debug.lkf" "add.asm" "d:\ti_ccs\c5400\cgtools\bin\cl500" -g -q -fr"E:/dsp_exercis/asm_add/Debug" -d"_DEBUG" -@"Debug.lkf" "vectors.asm" "d:\ti_ccs\c5400\cgtools\bin\cl500" -@"Debug.lkf" >> warning: entry point symbol _c_int00 undefined Build Complete, 0 Errors, 1 Warnings, 0 Remarks.
|