I'm looking for a way to print a number (mostly a byte) in hex notation.Does anybody know a simple solution for this ???
Kind regards ,
Here's one way:
(defun pc (i) (princ (code-char (+ i (if (<= i 9) 48 55)))))
(defun pb (i) (pn (ash i -4)) (pn (logand i 15)))
The function pc prints a hexadecimal character, and pb prints a byte.