From d24d92034ea278750668daff810147e0aec9dc04 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Fri, 9 Sep 2022 17:00:09 +0100 Subject: Pass the version --- src/Micro/Asm/Sdcc.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Micro/Asm/Sdcc.hs') diff --git a/src/Micro/Asm/Sdcc.hs b/src/Micro/Asm/Sdcc.hs index ef655d4..1fb05dd 100644 --- a/src/Micro/Asm/Sdcc.hs +++ b/src/Micro/Asm/Sdcc.hs @@ -31,8 +31,8 @@ onlyData symm = filter (\sym -> symRef sym) $ Map.elems symm -header :: [String] -header = [";", "; File created by $$$ v?.?.? (SDCC)", ";"] +header :: String -> [String] +header version = [";", "; File created by Micro v" ++ version ++ " (SDCC)", ";"] module' :: A.Expr -> [String] module' (A.Module name _) = ["\t.module " ++ name, "\t.optsdcc -mz80"] @@ -62,5 +62,5 @@ initVars symm = code :: [String] code = ["\n\t.area _CODE"] -generate :: SymMap -> [A.Expr] -> String -generate symm ast = unlines $ header ++ module' (head ast) ++ exports symm ++ dataVars symm ++ code ++ initVars symm +generate :: String -> SymMap -> [A.Expr] -> String +generate version symm ast = unlines $ header version ++ module' (head ast) ++ exports symm ++ dataVars symm ++ code ++ initVars symm -- cgit v1.2.3