I have implemented a new serial data transfer protocol in our 8051 system (80C552). I tryed to write the received characters immediately back to the terminal with the following commands:
ucrs232_buffer[ucrec_count] = S0BUF; S0BUF = ucrs232_buffer[ucrec_count];
When debugging serial comms, you always need to make sure that you are only debugging one end of the connection! Working with multiple unknowns is a recipe for confusion.