From 3d4632e498ee23e9c6b8b1b74a17a964b94f7b0e Mon Sep 17 00:00:00 2001 From: Denis Tereshkin Date: Sun, 19 Dec 2021 10:24:43 +0700 Subject: [PATCH] VM: annotations for missing instructions --- src/Nand2Tetris/VM.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Nand2Tetris/VM.hs b/src/Nand2Tetris/VM.hs index bdc8d03..1b69363 100644 --- a/src/Nand2Tetris/VM.hs +++ b/src/Nand2Tetris/VM.hs @@ -70,6 +70,12 @@ instrAnnotation :: VMInstruction -> T.Text instrAnnotation (VMArithmetic ACAdd) = "add" instrAnnotation (VMArithmetic ACSub) = "sub" instrAnnotation (VMArithmetic ACNeg) = "neg" +instrAnnotation (VMArithmetic ACEq) = "eq" +instrAnnotation (VMArithmetic ACGt) = "gt" +instrAnnotation (VMArithmetic ACLt) = "lt" +instrAnnotation (VMArithmetic ACAnd) = "and" +instrAnnotation (VMArithmetic ACOr) = "or" +instrAnnotation (VMArithmetic ACNot) = "not" instrAnnotation (VMMemAccess accessType segment) = strAccessType <> " " <> strSegment where