       is_push_command?(line) -> [:C_PUSH, command_args(line)]
       is_pop_command?(line) ->  [:C_POP,  command_args(line)]
       true -> [:C_ARITHMETIC, [line]]
+    end
+  end
+
+  def pointer_arg_to_register do
+    case arg2 do
+      0 -> "THIS"
+      1 -> "THAT"
     end
   end
   

     "A=M",
     "M=D"]
  end
  def translate_command([:C_POP, ["pointer", 0]]) do
    ["@THIS",    # get pointer+0 base address
     "D=A",
     "@R13",     # stick in R13
     "M=D",
     get_top_item_on_stack(), # pop off stack
     "D=M",
     "@R13", # stick in local address
     "A=M",
     "M=D"]
  end
  def translate_command([:C_POP, ["pointer", 1]]) do
    ["@THAT",    # get pointer+1 base address
     "D=A",
     "@R13",     # stick in R13
     "M=D",

     increment_stack_pointer()
    ]
  end
  def translate_command([:C_PUSH, ["pointer", arg2]]) do
    ["@#{pointer_arg_to_register(arg2)}",
     "D=M",
     set_top_of_stack_to("D"),
     increment_stack_pointer()
