X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=calu.git;a=blobdiff_plain;f=3a_asm%2FDTFormat.hs;h=17b2f014c8bc737dab587f75dc2bfbcabff301ce;hp=8b85ca1cca9c0656e4155bd0b6c391b4600b6db6;hb=b78eeefc173b4b432e8862ee9c27a5cacccc65a7;hpb=8baad9f9283eab93bc49d1c82f1534c48af0f594 diff --git a/3a_asm/DTFormat.hs b/3a_asm/DTFormat.hs index 8b85ca1..17b2f01 100644 --- a/3a_asm/DTFormat.hs +++ b/3a_asm/DTFormat.hs @@ -21,6 +21,7 @@ type ValueToParse = String type Code = String type Label = String type Comment = String +type Ascii = String data DTF = DTF_Data Address Value Code Label Comment | -- 0;... @@ -33,6 +34,7 @@ data DTF = DTF_Org Address | DTF_Define Label Value Comment | DTF_Fill Repeat Value Label Code Comment | + DTF_Ascii String Label Code Comment | DTF_State DT_State instance Show (DTF) where @@ -48,6 +50,7 @@ showsDTF (DTF_SectionToDet a v c l s) = (++) (datins "std" a v c l s) showsDTF (DTF_Org a) = (++) (printf "org;%08x\n" a) showsDTF (DTF_Define l a c) = (++) (printf "def;%s;%08x;%s\n" l a c) showsDTF (DTF_Fill r v code l c) = (++) (printf "fill;%08x;%08x;%s;%s;%s\n" r v code l c) +showsDTF (DTF_Ascii str l code c) = (++) (printf "ascii;%s;%s;%s;%s" str code l c) showsDTF (DTF_State s) = (++) (printf "sta;%s\n" (show s)) datins :: String -> Address -> Value -> Code -> Label -> Comment -> String