void display(signed long x)
{
signed long data t;
unsigned long data tc;
int data i,p,tp;
int fst=0;
for(i=0;i<MAX_DISPLAY_CHAR;i++)
{
ledbuf=0xff;
}
t=x;
if(x>=100000000||x<=-10000000){return;}//整数溢出
else if(x>=10000000||x<=-1000000){i=8;}
else if(x>=1000000||x<=-100000){i=7;}
else if(x>=100000||x<=-10000){i=6;}
else if(x>=10000||x<=-1000){i=5;}
else if(x>=1000||x<=-100){i=4;}
else if(x>=100||x<=-10){i=3;}
else if(x>=10||x<0){i=2;}
else{i=1;}
char value2led(char ch)
{
switch(ch)
{
case 0x00: return 0xc0;
case 0x01: return 0xf9;
case 0x02: return 0xa4;
case 0x03: return 0xb0;
case 0x04: return 0x99;
case 0x05: return 0x92;
case 0x06: return 0x82;
case 0x07: return 0xf8;
case 0x08: return 0x80;
case 0x09: return 0x90;
case 0x2d: return 0xbf;
}
}