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.

LPM0 and header files

Hi, 

I am trying to find out where is " __bis_SR_register(LPM0_bits + GIE)" defined, how does it work? Is it defined in "MSP430.H" file. 

Please advice! 

jess

  • Download and read the “MSP430 Optimizing C/C++ Compiler User's Guide SLAU132”.

  • Jessica Shaw said:
    I am trying to find out where is " __bis_SR_register(LPM0_bits + GIE)" defined, how does it work?

    The C language does not know about processor registers like the status register, the stack pointer or the program counter. Since the LPM control bits are in the status register, the compiler provides a few pseudo-functions (keywords that appear to be functions but are recognized by the compiler directly) to handle this.
    __bis_SR_register() for example sets bits in the status register. Something C has no language constructs for.
    These pseudo-functions are called intrinsics. See the compiler manual for a list and description. (and each compiler may have its own set - even though in MSP world, most are ‘standardized’ now)

**Attention** This is a public forum