This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSP430I2040:用户手册#39中修改的示例代码出错:asm ("BIC #CPUOFF+SCG1、0 (SP)");

Guru**** 2380860 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1035109/msp430i2040-error-in-modified-sample-code-in-user-s-manual-asm-bic-cpuoff-scg1-0-sp

器件型号:MSP430I2040

您好!

我的客户修改了用户手册 https://www.tij.co.jp/jp/lit/ug/slau335a/slau335a.pdf 的 P.30中显示的示例代码行 、如下所示。

 修改前: BIC #CPUOFF+SCG1,0 (SP)
 修改后: asm ("BIC #CPUOFF+SCG1,0(SP)";

编译代码时出现以下错误。
 指定  了非法助记符时出错

您能否提供任何应对措施来解决此错误?

下面显示了用户手册页面。

此致、Taki

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    简单、第一列中出现的符号被汇编器假定为标签。 因此、投诉涉及的助记符是"#CPUOFF"。 解决方法很简单:在 asm (" BIC ")中的引号后面加一个空格