作者l634259 (mat)
看板ASM
标题[问题] keil c 问题
时间Tue Apr 2 23:18:39 2013
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
SYMBOL: ?C_START
MODULE: STARTUP.obj (?C_STARTUP)
*** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: ?C_START
MODULE: STARTUP.obj (?C_STARTUP)
#include <reg51.h>
sbit RA0 = P2^0;
sbit RA1 = P2^1;
sbit RA2 = P2^2;
sbit RA3 = P2^3;
sbit RA4 = P2^4;
sbit RA5 = P2^5;
sbit RC0 = P1^0;
sbit RC1 = P1^1;
int A;
//=====================
main()
{
RA0=1;
RA1=1;
RA2=1;
RA3=1;
RA4=1;
RA5=1;
RC0=0;
RC1=0;
while(1){ if(RA0==0 )
{ A=1; }
if(RA1==0 )
{ A=2; }
if(RA2==0 )
{ A=3; }
if( RA3==1 && RA4==1 && RA5==1&&A==1)
{RC0=1;
RC1=0;
}
if( RA3==1 && RA4==0 && RA5==1&&A==1)
{RC0=0;
RC1=1;
}
if(A==1 && RA3==0)
{RC0=0;
RC1=0;
}
if( RA4==1 && RA3==0 && RA5==1&&A==2)
{RC0=0;
RC1=1;
}
if(RA4==1 && RA4==1 && RA5==0&&A==2)
{RC0=1;
RC1=0;
}
if(RA1==1 && RA4==0)
{RC0=0;
RC1=0;
}
if( RA3==1 && RA4==0 && RA5==1&&A==3)
{RC0=0;
RC1=1;
}
if(RA2==1 && RA5==0)
{RC0=0;
RC1=0;
}
}
}
为甚麽会出现2个警告程式哪出错了??
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 210.202.60.12
1F:→ cwl751005:你是不是没把档案汇入:P 04/03 00:12
2F:推 drag:看起来好像project setting没设定好晶片?(loader找不到?) 04/09 14:06
3F:→ drag:还有我不确定是不是要"void" main()... 04/09 14:06
4F:推 AriesLee:"void" 可以不用加,没回传值可省略 04/12 13:31
5F:推 jiannan1828:Header可以用regx51.h 或用89X51.h 04/24 02:57