MSP430 C Intrinsic Operators

MSP430 C Intrinsic Operators - MSP430 C Intrinsic Operators...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
MSP430 C Intrinsic Operators The compiler recognizes a number of intrinsic operators. Intrinsics are used like functions and produce assembly language statements that would otherwise be inexpressible in C. You can use C variables with these intrinsics, just as you would with any normal function. The intrinsics are specified with a leading underscore, and are accessed by calling them as you do a function. For example: short state; state = _get_SR_register(); No declaration of the intrinsic functions is necessary. The following is a list of function-like prototypes and the expected type for each parameter. Intrinsic Generated Assembly unsigned short __bic_SR_register (unsigned short mask ); BIC mask ,SR unsigned short __bic_SR_register_on_exit (unsigned short mask ); BIC mask ,saved_SR unsigned short __bis_SR_register (unsigned short mask ); BIS mask ,SR unsigned short __bis_SR_register_on_exit (unsigned short mask ); BIS mask ,saved_SR void __disable_interrupt (void); or _disable_interrupts
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

MSP430 C Intrinsic Operators - MSP430 C Intrinsic Operators...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online