3a_asm: .define support
[calu.git] / 3a_asm / DTFormat.hs
index 139367018da8ce0ca23e5f2f80361bb4310085c6..3e607fdec50803ccd2ad8f7758e044d798ac9af1 100644 (file)
@@ -25,6 +25,7 @@ data DTF =
        DTF_InstrToParse Address ValueToParse Code Label Comment |
        DTF_SectionToDet Address Value Code Label Comment |
        DTF_Org Address |
+       DTF_Define Label Value Comment |
        DTF_State DT_State
 
 instance Show (DTF) where
@@ -38,6 +39,7 @@ 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_State s) = (++) (printf "sta;%s\n" (show s))
 
 datins :: String -> Address -> Value -> Code -> Label -> Comment -> String