CCS中嵌入BRA指令为什么编译不通过

2019-07-30 20:33发布

嵌入BRA指令如下,目的是强行跳转到0x20266地址去执行



__asm("BRA #20266");
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
7条回答
johdon23
2019-07-31 20:56
问题已经找到了!
应该写成 __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.

再次感谢大家的热心回复!

一周热门 更多>