我用keil软件编译的时候出现问题,大家请帮忙啊………应该不是程序长度的限制 15
Buildtarget'Target1'assemblinga.asm...A51MACROASSEMBLERV8.00d-SN:EvalVersionCOPYRIGHT...
Build target 'Target 1'
assembling a.asm...
A51 MACRO ASSEMBLER V8.00d - SN: Eval Version
COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2007
"C:\Keil\C51\BIN\A51.EXE" "..\a.asm" SET (LARGE) DEBUG OBJECT(.\a.obj) EP
A51 FATAL ERROR -
ERROR: LIMIT EXCEEDED: SYMBOL-TABLE SPACE EXHAUSTED
A51 TERMINATED.
Target not created
程序如下:
#include <AT89X52.H>
unsigned char code dispbit[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
unsigned char code dispcode[]={0x3f,0x06,0x5b,0x4f,0x66,
0x6d,0x7d,0x07,0x7f,0x6f,0x00,0x40};
unsigned char dispbuf[8]={0,0,0,0,0,0,10,10};
unsigned char temp[8];
unsigned char dispcount;
unsigned char T0count;
unsigned char timecount;
bit flag;
unsigned long x;
void main(void)
{
unsigned char i;
TMOD=0x15;
TH0=0;
TL0=0;
TH1=(65536-4000)/256;
TL1=(65536-4000)%256;
TR1=1;
TR0=1;
ET0=1;
ET1=1;
EA=1;
while(1)
{
if(flag==1)
{
flag=0;
x=T0count*65536+TH0*256+TL0;
for(i=0;i<8;i++)
{
temp[i]=0;
}
i=0;
while(x/10)
{
temp[i]=x%10;
x=x/10;
i++;
}
temp[i]=x;
for(i=0;i<6;i++)
{
dispbuf[i]=temp[i];
}
timecount=0;
T0count=0;
TH0=0;
TL0=0;
TR0=1;
}
}
}
void t0(void) interrupt 1 using 0
{
T0count++;
}
void t1(void) interrupt 3 using 0
{
TH1=(65536-4000)/256;
TL1=(65536-4000)%256;
timecount++;
if(timecount==250)
{
TR0=0;
timecount=0;
flag=1;
}
P0=dispcode[dispbuf[dispcount]];
P2=dispbit[dispcount];
dispcount++;
if(dispcount==8)
{
dispcount=0;
}
} 展开
assembling a.asm...
A51 MACRO ASSEMBLER V8.00d - SN: Eval Version
COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2007
"C:\Keil\C51\BIN\A51.EXE" "..\a.asm" SET (LARGE) DEBUG OBJECT(.\a.obj) EP
A51 FATAL ERROR -
ERROR: LIMIT EXCEEDED: SYMBOL-TABLE SPACE EXHAUSTED
A51 TERMINATED.
Target not created
程序如下:
#include <AT89X52.H>
unsigned char code dispbit[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
unsigned char code dispcode[]={0x3f,0x06,0x5b,0x4f,0x66,
0x6d,0x7d,0x07,0x7f,0x6f,0x00,0x40};
unsigned char dispbuf[8]={0,0,0,0,0,0,10,10};
unsigned char temp[8];
unsigned char dispcount;
unsigned char T0count;
unsigned char timecount;
bit flag;
unsigned long x;
void main(void)
{
unsigned char i;
TMOD=0x15;
TH0=0;
TL0=0;
TH1=(65536-4000)/256;
TL1=(65536-4000)%256;
TR1=1;
TR0=1;
ET0=1;
ET1=1;
EA=1;
while(1)
{
if(flag==1)
{
flag=0;
x=T0count*65536+TH0*256+TL0;
for(i=0;i<8;i++)
{
temp[i]=0;
}
i=0;
while(x/10)
{
temp[i]=x%10;
x=x/10;
i++;
}
temp[i]=x;
for(i=0;i<6;i++)
{
dispbuf[i]=temp[i];
}
timecount=0;
T0count=0;
TH0=0;
TL0=0;
TR0=1;
}
}
}
void t0(void) interrupt 1 using 0
{
T0count++;
}
void t1(void) interrupt 3 using 0
{
TH1=(65536-4000)/256;
TL1=(65536-4000)%256;
timecount++;
if(timecount==250)
{
TR0=0;
timecount=0;
flag=1;
}
P0=dispcode[dispbuf[dispcount]];
P2=dispbit[dispcount];
dispcount++;
if(dispcount==8)
{
dispcount=0;
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询