.
[cc1516.git] / gen.icl
diff --git a/gen.icl b/gen.icl
index e92954c..f72f7f3 100644 (file)
--- a/gen.icl
+++ b/gen.icl
@@ -283,11 +283,15 @@ instance g Expr where
                                ,Instr "ldh" [Lit 0] "Get function number"
                                ,Instr "str" [Raw "R5"] ""
                                ,Instr "bsr" [L "1func"] ""
-                               ,Instr "ldr" [Raw "MP"] ""
-                               ,Instr "ldc" [Lit t] ""
-                               ,Instr "add" [] ""
-                               ,Instr "str" [Raw "SP"] ""
                                ,Instr "ldr" [Raw "RR"] ""
+       //                      ,Instr "ldl" [Lit t] ""
+       //                      ,Instr "ldh" [Lit $ 1] ""
+       //                      ,Instr "neg" [] ""
+       //                      ,Instr "ldr" [Raw "SP"] ""
+       //                      ,Instr "add" [] ""
+       //                      ,Instr "ldc" [Lit arity] ""
+       //                      ,Instr "sub" [] ""
+       //                      ,Instr "str" [Raw "SP"] ""
                                ]
                        )
                Nothing = liftT (Left $ Error "Undefined function!!!")
@@ -303,7 +307,7 @@ instance g Stmt where
         fresh >>= \elseLabel->
         fresh >>= \endLabel->
         g cond >>|
-        tell [Instr "brf" [L elseLabel] "branch else"] >>|
+       tell [Instr "brf" [L elseLabel] "branch else"] >>|
         mapM_ g th >>|
         tell [Instr "bra" [L endLabel] "branch end if"] >>|
         tell [Lab elseLabel] >>|
@@ -368,7 +372,7 @@ instance g FunDecl where
 
 annote :: Int String -> Gen ()
 annote pos key = 
-    tell [Instr "annote" [Raw "MP", Lit pos, Lit pos, Raw "green", Raw key] ""]
+    tell [Instr "annote" [Raw "MP", Lit pos, Lit pos, Raw "black", Raw key] ""]
 
 class print a :: a -> [String]