3a_asm: more .fill power and better 'make test' target
[calu.git] / 3a_asm / DTFormat.hs
index be9aafe462d7ebbeb8f35161fe3a31cc1c6b0a18..3a43eb8b854487ca6b4c18dbd13af4c44b0f5566 100644 (file)
@@ -14,6 +14,7 @@ data DT_State = NoState | InData | InText deriving (Show,Eq)
 
 type Address = Word32
 type Value = Word32
+type Repeat = Word32
 type ValueToParse = String
 type Code = String
 type Label = String
@@ -29,6 +30,7 @@ data DTF =
        DTF_SectionToDet Address Value Code Label Comment |
        DTF_Org Address |
        DTF_Define Label Value Comment |
+       DTF_Fill Repeat Value Label Code Comment |
        DTF_State DT_State
 
 instance Show (DTF) where
@@ -42,7 +44,8 @@ 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_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_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_State s) = (++) (printf "sta;%s\n" (show s))
 
 datins :: String -> Address -> Value -> Code -> Label -> Comment -> String