I need to sift through my code and pull out the serial stuff (it's a long code as it stands) and reply to you this evening. What PIC are you using by the way?

Also, could you describe what you want to do again in more detail? I'm a little confused when you say X stands for SOT and Y for EOT. I'm still a newbie in programming, but I'm sure I can help you with this. So far I gather you want to receive a serial string and read it. You then want the PIC to do something by way of transmitting another serial string and placing the characters in a specific location along that string? Which is no problem I just want to make sure I'm giving you what you want.

-Tony