Update:
The PIC is sending the correct data on the TX pin with both compilations.
The problem is in the RS485 Tx enable line.
With PBPL, the PIC sends data out and after a 2mS delay, sets the RS485 line to receive mode from transmit. But with PBP, the 2mS delay is not working, so it was dropping off halfway through the last (checksum) byte.
109 decimal is 0110 1101 or 10110110 in RS232
45 decimal is 0010 1101 or 10110100 in RS232
Now to investigate why the 2mS delay timer is different between compilations.
Many thanks for your help and suggestions.
Tim.
Bookmarks