| 
 
| #include<reg51.h> #include<stdio.h>
 
 
 unsigned int BCDTOHEX(unsigned int bcd_data)
 {
 unsigned  char temp;
 
 temp=(( bcd_data>>8)*100)|((bcd_data>>4)*10)|(bcd_data&0x0f);
 
 return temp;
 }
 
 
 
 
 
 void main (void)
 {
 unsigned char  c;
 
 unsigned int  b;
 b= 1001;
 
 c = BCDTOHEX(b);
 }
 编译没问题,执行就出错?
 
 问题在那呢
 
 
 | 
 |