void dly(void)
{unsigned long cnt=2e5;
while(cnt--);
}
void main(void)
{unsigned char flag,cnt=0;
while(1)
{cnt++;
if(cnt>=8)cnt=0;
flag=(0x1< P1=~flag; dly(); } }
P1=~flag;
dly();
循环移位,