编译结果是这样的
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: _DELAYMS
MODULE: part2_7.obj (PART2_7)
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS
SYMBOL: MAIN
MODULE: part2_7.obj (PART2_7)
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?MAIN?PART2_7
一脸懵
简单的抄书上的代码都这样,感觉有点小fw,代码如下
#include<reg52.h>
#include<intrins.h>
#define uint unsigned int
#define uchar unsigned char
void delayms(uint);
uchar aa; //定义一个变量,给P1口赋值
void main()
{
aa=0xfe; //赋初始值
while(1)
{
P1=aa; //点亮第一个发光管
delayms(500);
aa=_crol_(aa,1); //将aa循环左移一位后再赋给aa
}
}
void delayms(uint xms)
{
uint i,j;
for(i=xms;i>0;i--)
for(j=110;j>0;j--);
}
|