#include<REGX51.H>
#define LED_BIGY P2
unsigned char shumaguan[10]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
sbit k1 = P1^0;
sbit k2 = P1^1;
void delay(unsigned int t)
{
unsigned int t1;
t1=t;
while(t1--);
}
void main(void)
{
if(k1==1)
{
delay(1000);
if(k1==1)
{
shumaguan=shumaguan[1];
}
while(!k1);
}
if(k2==1){
delay(1000);
if(k2==1)
{
shumaguan=shumaguan[2];
}
while(!k2);
}
}
两下滑线处一直提示led.c(24): error C213: left side of asn-op not an lvalue