+ asciify :: String -> SDoc
+ asciify "" = text "\t.ascii \"\\0\""
+ asciify str
+ = let fst = take 16 str
+ rest = drop 16 str
+ this = text ("\t.ascii \""
+ ++ concat (map asciify_char fst)
+ ++ "\"")
+ in this $$ asciify rest
+ asciify_char :: Char -> String
+ asciify_char c = '\\' : 'x' : hshow (ord c)
+
+ hshow :: Int -> String
+ hshow n | n >= 0 && n <= 255
+ = [ tab !! (n `div` 16), tab !! (n `mod` 16)]
+ tab = "0123456789abcdef"
+
+{-