今天遇到一个新手代码
void dakai()
{
if(S7 == 0)
{
TR0 = 1;
}
}
void main()
{
P2 = (P2&0X1f)|0xa0;P0 = 0x00;P2 &=0x1f;
P2 = (P2&0X1f)|0x80;P0 = 0xff;P2 &=0x1f;
P2 = (P2&0X1f)|0x80;
Init_Timer0();
while(1);
{
dakai();
}
}
发现出现一个警告,很好玩.
`*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS`
SEGMENT: ?PR?DAKAI?ZUOYE
在一般认识里是因为dakai()函数没有放在主函数,在该问题中
原因是在while(1)后打了个分号导致无法调用 dakai();