#include<reg52.h>
#include<intrins.h>
#define uchar unsigned char
#define uint unsigned int
Void delay();
uchar a;
Uint i;
void main()
{
while(1)
{
a=0xfe;
P1=a;
for(i=0;i<8;i++)
{
a=_crol_(a,1);
delay();
}
for(i=0;i<8;i++)
{
P1=a;
a=_cror_(a,1);
delay();
}
}
}
Void delay()
{
uint c,b;
for(c=200;c>0;c--)
for(b=100;b>0;b--);
} |