anchor.diff:  -export([start_link/0, call/2, getch/0]).
   
   %% Records
  --record(state, { port, getpid }).
  +-record(state, { port, getch }).
   
   %% =============================================================================
   %% Module API
  
positive.code:     erlang:port_close(State#state.port),
      erl_ddll:unload("cecho").
  
  handle_info({getch, From}, #state{ getpid = undefined } = State) ->
      {noreply, State#state{ getpid = From }};
  handle_info({getch, From}, State) ->
      exit(From, kill),
      {noreply, State};
  handle_info({_Port, {data, _Binary}}, #state{ getpid = undefined } = State) ->
      {noreply, State};
  handle_info({_Port, {data, Binary}}, State) ->
      Ch = binary_to_term(Binary),
      State#state.getpid ! {ch, Ch},
      {noreply, State#state{ getpid = undefined }}.
  
  %% @hidden
  handle_cast(_, State) ->
  
negative.code:     gen_server:call(?MODULE, {call, Cmd, Args}, infinity).
  
  getch() ->
      gen_server:call(?MODULE, getch, infinity).
  
  %% =============================================================================
  %% Behaviour Callbacks
  