The header file <inmsp.h> defines a number of intrinsic functions of general use for the MSP430 processor. This file is written to be compatible, and in some cases an enhancement of, the <in430.> file in version 3 of IAR's Embedded Workbench for MSP430 (EW430) product.
| Status register manipulation | |
| __bic_SR_register | Clear bits in status register |
| __bic_SR_register_on_exit | Clear bits in stacked status register |
| __bis_SR_register | Set bits in status register |
| __bis_SR_register_on_exit | Set bits in stacked status register |
| __disable_interrupt | Disable global interrupts |
| __enable_interrupt | Enable global interrupts |
| __low_power_mode_0 | Enter low power mode 0 |
| __low_power_mode_1 | Enter low power mode 1 |
| __low_power_mode_2 | Enter low power mode 2 |
| __low_power_mode_3 | Enter low power mode 3 |
| __low_power_mode_4 | Enter low power mode 4 |
| __low_power_mode_off_on_exit | Enter active mode when interrupt return |
| __set_interrupt | Restore global interrupts |
| Byte order manipulation | |
| __swap_bytes | Swap order of bytes in a word |
| __swap_long_bytes | Swap order of bytes in a long |
| __swap_words | Swap order of words in a long |
| Bit order manipulation | |
| __bit_reverse_char | Reverse the order of bits in a char |
| __bit_reverse_long | Reverse the order of bits in a long |
| __bit_reverse_long_long | Reverse the order of bits in a long long |
| __bit_reverse_short | Reverse the order of bits in a short |
| Bit counting | |
| __bit_count_leading_zeros_char | Count the number of leading zero bits in a char |
| __bit_count_leading_zeros_long | Count the number of leading zero bits in a long |
| __bit_count_leading_zeros_long_long | Count the number of leading zero bits in a long long |
| __bit_count_leading_zeros_short | Count the number of leading zero bits in a short |
| Register manipulation | |
| __get_register | Read from processor register |
| __set_register | Write to processor register |
| Binary coded decimal arithmetic | |
| __bcd_add_long | Add two 32-bit values using decimal arithmetic |
| __bcd_add_long_long | Add two 64-bit values using decimal arithmetic |
| __bcd_add_short | Add two 16-bit values using decimal arithmetic |
| __bcd_negate_long | Negate a 32-bit value using decimal arithmetic |
| __bcd_negate_long_long | Negate a 64-bit value using decimal arithmetic |
| __bcd_negate_short | Negate a 16-bit value using decimal arithmetic |
| __bcd_subtract_long | Subtract two 32-bit values using decimal arithmetic |
| __bcd_subtract_long_long | Subtract two 64-bit values using decimal arithmetic |
| __bcd_subtract_short | Subtract two 16-bit values using decimal arithmetic |
| Miscellaneous functions | |
| __delay_cycles | Delay execution for a number of cycles |
| __even_in_range | Assert value is a restricted range |
| __insert_opcode | Insert an opcode |
| __no_operation | Insert a NOP instruction |
| Extended memory functions | |
| __read_extended_byte | Read a byte from extend memory |
| __read_extended_long | Read a long from extended memory |
| __read_extended_word | Read a word from extended memory |
| __write_extended_byte | Write a byte to extended memory |
| __write_extended_long | Write a long to extended memory |
| __write_extended_word | Write a word to extended memory |