程序不知道问题出在哪,求助!
时间:10-02
整理:3721RD
点击:
抢答器简单程序如下:
#include<reg52.h>
sbit key1=P3^0;
sbit key2=P3^1;
sbit key3=P3^2;
sbit key4=P3^3;
/*-----------------------------------------------
主函数
------------------------------------------------*/
main()
{
bit Flag;
while(!Flag)
{
if(!key1) {P1=0xFE;Flag=1;}//
else if(!key2){P1=0xFD;Flag=1;}//
else if(!key3){P1=0xFB;Flag=1;}//
else if(!key4){P1=0xF7;Flag=1;}//
}
while(Flag);
}
编译结果:
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?_DISPLAY?基__蔩入蔩_?
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?MAIN?__蔩器__理闪薩
Program Size: data=24.0 xdata=0 code=649
Target not created
之前很多程序编译结果都是这样的,实在不知道问题出在哪里。求各位大侠相助!不胜感激
#include<reg52.h>
sbit key1=P3^0;
sbit key2=P3^1;
sbit key3=P3^2;
sbit key4=P3^3;
/*-----------------------------------------------
主函数
------------------------------------------------*/
main()
{
bit Flag;
while(!Flag)
{
if(!key1) {P1=0xFE;Flag=1;}//
else if(!key2){P1=0xFD;Flag=1;}//
else if(!key3){P1=0xFB;Flag=1;}//
else if(!key4){P1=0xF7;Flag=1;}//
}
while(Flag);
}
编译结果:
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?_DISPLAY?基__蔩入蔩_?
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
SEGMENT: ?PR?MAIN?__蔩器__理闪薩
Program Size: data=24.0 xdata=0 code=649
Target not created
之前很多程序编译结果都是这样的,实在不知道问题出在哪里。求各位大侠相助!不胜感激