# include <reg51.h>
# include <intrins.h>
#define LED P2
void Delay(unsigned int);
void main(void)
{
unsigned char n;
LED=0x01;
while(1)
{
for(n=0; n<7; n++)
{
LED = _crol_(LED,1);
Delay(25);
}
for(n=0; n<7; n++)
{
LED = _cror_(LED,1);
Delay(25);
}
}
}
void Delay(unsigned int c)
{
unsigned int i, j;
while(c--)
{
for(i=38; i>0; i--)
for(j=130; j>0; j--);
}
}
九州编程
慕尼黑的夜晚无繁华
慕森王