#include <REGX52.H>
sbit S = P3 ^ 1;
/*****************************************************/
void delay(unsigned int i)
{
while (i--);
}
/*******************************************************/
void main()
{
unsigned char i;
unsigned char display[] = { 0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f };
P2 = 0xff;
if (S == 0)
{
delay(1200);
while (!S);
delay(1200);
while (1)
{
for (i = 0; i <= 7; i++)
{
P2 = display[i];
delay(40000);
}
}
}
}