Created
May 22, 2018 09:40
-
-
Save sandrovicente/841033ab9f2a8933e05037eef7c171d8 to your computer and use it in GitHub Desktop.
emacs 7BitEncodedInt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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