how can the sbuf register be told to send a string that is received?
No, it is not better - because you have still not understood that SBUF is only a single byte (in each direction).
Leaving the 8051 and Keil specifics aside, it is not even valid 'C' - eg, what do you think will happen when you use a string as the index to a 'C' array...?!
"i know SBUF is not array and i need [] for array so i try"
You just said it: SBUF is not an array - therefore you cannot use [ ] with it!
You need to spend some time studying a basic 'C' textbook.
"... not even valid 'C' - eg, what do you think will happen when you use a string as the index ..."
Actually, the compiler probably will allow this - as it is, in fact, valid within the syntax of the 'C' language. However, I very much doubt that it will do what you want it to do...
because you have still not understood that SBUF is only a single byte (in each direction).
You are trying to run before you have learned to walk You are trying to walk before you have learned to crawl
There are no shortcuts, sorry.
I know that 'read' is a 4 letter word and am thus sorry to use it, but the only way you will get anywhere is by reading "the bible" more than once. Then read the tutorials here and at http://www.8052.com and then and only then try coding something. Posting questions based on yout total lack of understanding will not get you anywhere.
Erik
"the only way you will get anywhere is by reading "the bible" more than once. Then read the tutorials here and at http://www.8052.com and then and only then try coding something."
Unfortunately not.
That will give you sufficient understanding of the 8051 - but you also need a basic understanding of the 'C' programming language.
So, in addition to the above, you will also need a 'C' textbook.
yes