port code to msp430-gcc version 4.6.3