
while(1)    // you say interrupt? a while in an interrupt?
{
   if(RI)
      m=SBUF;  

   switch(m)   // you run the switch even if the is no byte
   {
      case '1':
         RI=0;
         if(RI)   // now you are stuck her even if there is no byte
         {
            P1=SBUF;
         }
         break;   // do you need a break here?
      case '2':
   ----

}
