diff options
Diffstat (limited to 'projects/hack-vm/arith_logic.py')
-rw-r--r-- | projects/hack-vm/arith_logic.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/projects/hack-vm/arith_logic.py b/projects/hack-vm/arith_logic.py index 6716ad9..a184067 100644 --- a/projects/hack-vm/arith_logic.py +++ b/projects/hack-vm/arith_logic.py @@ -22,5 +22,7 @@ ARITH_LOGIC_ASM = { } -def translate_arith_logic(command): - return ARITH_LOGIC_ASM[command] +def translate_arith_logic(command, verbose=False): + asm = f"// {command}\n" if verbose else "" + asm += ARITH_LOGIC_ASM[command] + return asm |