#include<reg51.h>
#include<intrins.h>
sbit K1=P3^3;
char a=0x00;
delay()
{
int i;
for(i=10000;i>1;i--);
}
main()
{
P1=a;
while(1)
{
while(K1==1)
{
while(K1==1);
delay();
}
while(K1==0);
delay();
a++;
P1=a;
}
}