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.

菜鸟问题

各位:刚学msp430,有问题请教各位: __bic_SR_register_on_exit(CPUOFF)和 __bic_SR_register(CPUOFF)两条指令执行结果有何不同?谢谢!

  • __bic_SR_register_on_exit()是在中断函数使用的

    __bic_SR_register_on_exit

    Syntax

    void __bic_SR_register_on_exit(unsigned short);

    Description

    Clears bits in the processor status register when an interrupt or monitor function returns. The function takes an integer as its argument, that is, a bit mask with the bits to be cleared.

    This intrinsic function is only available in interrupt and monitor functions.

    __bic_SR_register

    Syntax

    void __bic_SR_register(unsigned short);

    Description

    Clears bits in the processor status register. The function takes an integer as its argument, that is, a bit mask with the bits to be cleared.

  • __bic_SR_register_on_exit

    功能:用于一个中断函数或者不可中断函数返回时,将CPU内SR寄存器中的某些位清0。其参数为屏蔽码,需要清0的位为1。

    __bis_SR_register

    功能:将CPU中SR寄存器中的某些位置1。其参数为屏蔽码,需要置1的位为1。