大家帮我看下这个程序哪错了?
#include<reg52.h>#define uc unsigned char
#define ui unsigned int
uc code tabledub[]={~0x3F,~0x06,~0x5B,~0x4F,~0x66,~0x6D,
~0x7D,~0x07,~0x7F,~0x6F,~0x77,~0x7C,~0x39,~0x5E,~0x79,~0x71};
uc b,temp,b1;
void delay(uc x)
{
ui y;
for(;x!=0;x--)
for(y=1100;y>0;y--);
}
uc keyscan();
main()
{
while(1)
{
b1=keyscan();
P3=tabledub[b1];
}
}uc keyscan();
{
P3=0xfd;
temp=P3;
temp=temp&0xf0;
while(temp!=0xf0)
{
delay(3);
while(temp!=0xf0)
{
temp=P3;
switch(temp)
{
case 0xed:b=0;
break;
case 0xdd:b=1;
break;
case 0xbd:b=2;
break;
case 0x7d:b=3;
break;
}
// P1=tabledub[b];
temp=temp&0xf0;
}
// temp=temp&0xf0;
}
P3=0xfb;
temp=P3;
temp=temp&0xf0;
while(temp!=0xf0)
{
delay(3);
while(temp!=0xf0)
{
temp=P3;
switch(temp)
{
case 0xeb:b=4;
break;
case 0xdb:b=5;
break;
case 0xbb:b=6;
break;
case 0x7b:b=7;
break;
}
// P1=tabledub[b];
temp=temp&0xf0;
}
// temp=temp&0xf0;
}
P3=0xf7;
temp=P3;
temp=temp&0xf0;
while(temp!=0xf0)
{
delay(3);
while(temp!=0xf0)
{
temp=P3;
switch(temp)
{
case 0xe7:b=8;
break;
case 0xd7:b=9;
break;
case 0xb7:b=10;
break;
case 0x77:b=11;
break;
}
// P1=tabledub[b];
temp=temp&0xf0;
}
// temp=temp&0xf0;
}
return b;
}
结果显示有错误,点击错误提示老弹出“.......包含不可用路径”这是怎么回事?