Create Assembler module and implement some basic tokenizers

This commit is contained in:
2021-11-03 11:10:24 +01:00
parent a5db26d307
commit a73ab7fc89
3 changed files with 47 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
module Util (
toLowerCase,
byteStr,
bytesStr
) where
@@ -6,6 +7,10 @@ module Util (
import Data.List
import Data.Word
import Numeric (showHex)
import qualified Data.Char as Char
toLowerCase :: String -> String
toLowerCase = map Char.toLower
bytesStr :: Int -> [Word8] -> String
bytesStr sparse = insertAtN '\n' (sparse*3) . intercalate " " . map byteStr