摘要: View Code 1boolBCDtoStr(char*str,unsignedchar*BCD,intBCD_length)2{3if(BCD==0||BCD_length==0)4returnfalse;5inti,j;6for(i=0,j=0;i<BCD_length;i++,j+=2)7{8str[j]=(BCD[i]>>4)>9?(BCD[i]>>4)-10+'A':(BCD[i]>>4)+'0';9str[j+1]=(BCD[i]&0x0F)>9?(BCD[i]&0x0F)-10 阅读全文
posted @ 2011-04-15 23:53 tungli 阅读(2228) 评论(0) 推荐(0) 编辑