问题已经找到了!
应该写成 __asm(" BRA #20266");
即在BRA指令前至少要有一个空格!
在MSP430汇编指令的手册中有如下规定:
“A mnemonic cannot begin in column 1 or it will be interpreted as a label. Mnemonic opcodes and assembler directive names without the . prefix are valid label names. Remember to always use whitespace before the mnemonic, or the assembler will think the identifier is a new label definition.
”
再次感谢大家的热心回复!
CCS的C编译器,对嵌入的汇编语言不作检查。不应该是本语句问题。
asm前有没有下划线,都可以通过的。
应该写成 __asm(" BRA #20266");
即在BRA指令前至少要有一个空格!
在MSP430汇编指令的手册中有如下规定:
“A mnemonic cannot begin in column 1 or it will be interpreted as a label. Mnemonic opcodes and assembler directive names without the . prefix are valid label names. Remember to always use whitespace before the mnemonic, or the assembler will think the identifier is a new label definition.
”
再次感谢大家的热心回复!
一周热门 更多>