Yes. Whenever there are any characters in the buffer to be read, just copy that main location, 1 by 1, checking the empty flag, into your own 6 character long FIFO buffer. Now you have access to any character you want, it will only eat 6 bytes of ram. You can also make your own read buffer any number of characters you like.
Basically, (ok, I oversimplified thing, you can use a loop and make a 20 character buffer history for the rxcom)
while ( uxreg not empty ) {
charbuf[1] = charbuf[2];
charbuf[2] = charbuf[3];
charbuf[3] = charbuf[4];
charbuf[4] = charbuf[5];
charbuf[5] = charbuf[6];
charbur[6] = uxrxreg;
}
Now, if you want character 6, read charbuf#6, if you want character #1, use charbuf#1.
This is excellent if you have say a 4 character command with a CR/LF at the end, just monitor for the CR/LF and use the contents of the earlier charbuf#s buffer since they will still contain your command contents.
Oh, and if this is an interrupt service of your own making, make charbuf is a global array so that their contents are not lost since your probably getting single characters much slower than the execution speed of your code and you don't want to sit there waiting for all your characters to come in.
Now when I say waiting for CR/LF, you will be checking charbuf#6 and #5. You obviously cant be always reading the rxreg. Aslo, after the test, if you want to only execute a command one, once executed, just clear out all the 'charbuf#s = 0;'. Now you cleared the valid CR/LF terminator and... I'll let you figure out the rest.