If I understand, you just said that wrong, just sending 'f' or 'g' would print those character son the LCD rather than treat them as instructions. I think what you are trying to do is use the '?' to indicate the next character is an instruction.
Basically, just look for the '?' from your receive routine and when you find it, drop into a routine that again waits for a character, decodes it and performs the action you require. However, I have reservations about your timing routines and it might not work as you intended. With the software UART you are using, it is essential you are monitoring the input state at a constant rate or you will miss any character arriving. Consider that while in your delay routine, transmitting or while writing to the LCD, you are vulnerable to losing bits in the input stream. A much better way of doing it is to use the hardware UART and interrupts. The code will be smaller and can be doing something else while still receiving serial data. An interrupt will alert your program when all 8 bits of data have been received and is ready to use, you don't have to do any timing code or loops at all.
Brian.