程序如下,大家看看 #include<reg52.h> delay(int i) { int j; for(;i>0;i--) for(j=0;j++;j<0); } send_char(char c) { SBUF=c; while(TI==0); TI=0; } send(char *ch,int len) { int i=0; do { send_char(*(ch+i)); i++; }while(i<len) ; } main() { IE=0x00; SCON=0x50; TMOD=0x20; PCON=0x80; TH1=0xFA; TR1=1; send("hello everybody!",17); send_char(0x55); delay(500); } 此程序能正常显示: hello everybody!U 但是如果注释了send("hello everybody!",17);,就会不停显示U,何解? |