void getSBUF() interrupt 4 using 1 { char temp = 1; temp = SBUF; RI = 0; }
Can you be more specific? Code like that you posted works for me. "SBUF" is just a conventional name for a declaration like "sfr SBUF = 0x99". So the assignment statement is pretty much just an instruction to copy one internal RAM location to another. The variable temp won't survive return from the function getSBUF, since it's delcared local. Where are you checking the value to know that it's not the correct one?