Thanks to excellent examples on here I now have a ring buffer working on my 16F88 accepting a stream
of 9600 baud 12 byte data packets and squirting the bytes back out of the TX as quickly as they arrive.

That's great but i now need to manipulate the bytes in the packets before they are tramsmitted
and before they are overwritten by fresh incomming data.

It's general ideas I am after rather than example code.

Should I have a seperate RX & TX buffer and then move the bytes from one to the other
when i'm ready to transmit something.

Or should i just wait until first packet recd and whilst second packet is coming in manipulate the first packet and transmit it?

I have to drive a serial lcd in the spare time so need the interrupt driven capability.

So for example 12 byte packet arrives in 24 byte RX buffer. When first 12 byte packet has arrived and whilst second twelve bytes are arriving the first 12 bytes are manipulated as reqd and then transmitted.

There is some spare time between packets about 12ms in fact. I don't think the incomming data will cathc
up with the tx data.

Another issue is the packets have specific header bytes $87 or $AA, how can i make the ring buffer
RX routine wait until they appear before starting to recieve the following 11 bytes? I need to have th bytes in a consistent places in the buffer to manipulate them so for instance buffer position 0 always contains $87 and position 12 always contains $AA?

Can you also have an interrupt driven TX routine?

Thanks Peter