#include<reg52.h>
#include <intrins.h> //include the statement of the "_crol(,)" function
#define uint unsigned int //redefine type
#define uchar unsigned char
sbit diola = P2^5;//initial it as high vol,so we can do nothing for it.
void delayms(uchar z);//simulate a function to delay z seconds
void main()
{
uchar itemp;
P1=0xfe;
while(1)
{
itemp = P1;
P1 = _crol_(itemp,1); //rotate the bit of itemp to left a bit
delayms(1000);
}
}
void delayms(uchar z)
{
uchar x,y;
for(x=z;x>0;--x)
for(y=110;y>0;--y);
}