scrambled uart output
I think you need to poll the Transmit Shift Register Status TRMT rather than TXIF. When TRMT==1 the register is empty and it is ready to transmit a byte.

But upon a second look I notice that the wrong characters are always off by the same bit in the ASCII code. When a character is wrong the first (low order) bit in the ASCII character is supposed to be 1, but it is replaced with a 0. 'S' turns into 'R', 'O' into 'N', 'u' into 't'. That seems like a signal integrity issue over the data cable. 

While I do think that you will need to poll the TRMT bit, I don't think that your current problem is software. Look for anything that may affect the quality of the cable connection.