11.07.2015 Views

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Intrinsic functionsDescriptionPerforms a binary coded decimal addition. The parameters and the return value arerepresented as binary coded decimal (BCD) numbers, that is when a hexadecimalnumber (0x19) is used for representing the decimal number 19. The following functionsare supported:Function__bcd_add_short__bcd_add_long__bcd_add_long_longReturn valueTable 36: Functions for binary coded decimal operationsExample /* c = 0x19 */c = __bcd_add_short(c, 0x01);/* c = 0x20 */Returns the sum of the two short parameters. The parametersand the return value are represented as four-digit BCD numbers.Returns the sum of the two long parameters. The parametersand the return value are represented as eight-digit BCDnumbers.Returns the sum of the two long long parameters. Theparameters and the return value are represented as sixteen-digitBCD numbers.__bic_SR_registerSyntaxDescriptionvoid __bic_SR_register(unsigned short);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_exitSyntaxDescriptionvoid __bic_SR_register_on_exit(unsigned short);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 becleared.This intrinsic function is only available in interrupt and monitor functions.Part 2. <strong>Compiler</strong> <strong>reference</strong>217

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!