procedure HexToAscii(X: Byte; P: PChar);<br> procedure HexToAscii1(X: Byte; P: PChar);<br> begin<br> case X of<br> 0..9: P^:= Chr(X + Ord('0'));<br> 10..15: P^:= Chr(X + Ord('A'));<br> end;<br> end;<br>begin<br> HexToAscii1((X shr 4), P);<br> Inc(P);<br> HexToAscii1((X and $F), P);<br>end;