cpu: ext_reg switch bug FIX by markus
[calu.git] / 3a_asm / DTFormat.hs
index 8b85ca1cca9c0656e4155bd0b6c391b4600b6db6..fa1ddb1571e3bfacc8297155fc552c6485fa615f 100644 (file)
@@ -21,6 +21,8 @@ type ValueToParse = String
 type Code = String
 type Label = String
 type Comment = String
+type Ascii = String
+type LineNo = Word32
 
 data DTF =
        DTF_Data Address Value Code Label Comment | -- 0;...
@@ -28,11 +30,12 @@ data DTF =
        DTF_Comment Comment | -- 2;...
        DTF_Label Label Comment Address | -- 3;...
        -- types for intern processing
-       DTF_InstrToParse Address ValueToParse Code Label Comment |
+       DTF_InstrToParse Address ValueToParse Code Label Comment LineNo |
        DTF_SectionToDet Address Value Code Label Comment |
        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
@@ -43,11 +46,12 @@ showsDTF (DTF_Data a v c l s) = (++) (datins "0" a v c l s)
 showsDTF (DTF_Instr a v c l s) = (++) (datins "1" a v c l s)
 showsDTF (DTF_Comment c) = (++) (printf "2;%s\n" c)
 showsDTF (DTF_Label l c _) = (++) (printf "3;%s;%s\n" l c)
-showsDTF (DTF_InstrToParse a v c l s) = (++) (printf "itp;%08x;%s;%s;%s;%s\n" a v c l s)
+showsDTF (DTF_InstrToParse a v c l s lno) = (++) (printf "itp;%08x;%s;%s;%s;%s@%d\n" a v c l s lno)
 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