Skip to content

Instantly share code, notes, and snippets.

@sandrovicente
Created May 22, 2018 09:40
Show Gist options
  • Save sandrovicente/841033ab9f2a8933e05037eef7c171d8 to your computer and use it in GitHub Desktop.
Save sandrovicente/841033ab9f2a8933e05037eef7c171d8 to your computer and use it in GitHub Desktop.
emacs 7BitEncodedInt
(defun conv (v)
(let (
(base #x80) (ac v) (q) (r))
(while (> ac 0)
(setq q (/ ac base))
(setq r (% ac base))
(if (> q 0) (setq r (+ r base)))
(print (format "%x" r))
(setq ac q))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment