作者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