#include
#define uchar unsigned char
void delay(void)
{
uchar i,j;
for(i=0;i<200;i++)
for(j=0;j<120;j++);
}
void ext0() interrupt 0
{
uchar i;
for(i=0;i<8;i++)
{
P2=0x00;
delay();
P2=0xff;
delay();
}
}
main()
{
uchar i;
EX0=1;
IT0=1;
EA=1;
while(1)
{
P2=~(1< delay();
i++;
i%=8;
}
}