#include<reg52.h>
unsigned char a;
sbit s2=P3^4;
void delay()
{unsigned int j=500000;
while(j--);
}
void main()
{
s2=0;
EA=1;
EX0=1;
IT0=0;
a=0xf0;
while(1)
{
P1=a;
}
}
void ext0() interrupt 0
{
//if(s2==0)
{
a=0xfe;
//delay();
//a=0xff;
//delay();
}
//EX0=0;
} |