#include <8051.h>
void myint_t0() interrupt 0;
void main ()
{

   EA = 1;
   EX0 = 1;
   P2 = 0x00;
   
   for(;;)
   {
   
   }
   
}
void myint_t0() interrupt 0
{
     int i;
     i = P1;
     if (P0 == i)
     {
        P2 = i;
     }
}


