单片机跑马灯出错
跑马灯实验(c51).c(19): error C141: syntax error near 'for'程序代码:
#include<stdio.h> #include<reg51.h> #include<intrins.h> unsigned char byTemp[3] _at_ 0x0023; void Delay1s(void) { unsigned char a,b,c; for(c=152;c>0;c--) for(b=70;b>0;b--) for(a=46;a>0;a--); _nop_(); } void main(void) { unsigned char data byLedValue=0xFE for (;;) { p0 = byLedValue; Delay1s(); byLedValue = _crol_(byLedValue,1); } }