while ((IFG2 & UCA0TXIFG) == 0); //loop until buffer is free
UCA0TXBUF = x; /* send the character */
while(!(IFG2 & UCA0TXIFG));
while ((IFG2 & UCA0TXIFG) == 0); //loop until buffer is free
UCA0TXBUF = x; /* send the character */
while(!(IFG2 & UCA0TXIFG));