#include <reg52.h>
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int 
#define led  P0

void delay (void)
{
      uchar a,b;
		for(a=0;a<200;a++)
		for(b=0;b<200;b++);

}
void main(void)
{

       uchar i,k;
		 
	while(1)
	{
		k = 0xfe;
	   for(i=0;i<8;i++) 
		{
		
		 led  = k;
		 delay();
		 k = _crol_(k,1);
		 i=i++;
   	 }
		 k = 0x7f;
		 for(i=0;i<8;i++)
		 {
		 led = k;
		 delay();
		 k=_cror_(k,1);
		 i=i++;
		 }
	}
}
