anchor.diff:    end;
    
  -function TShellMorph.Send( msg : IMessage ) : boolean;
  -  var ch : char;
  -  begin
  -    if msg.tag = evt_keydn then with msg as TEvent do
  -      begin
  -        result := true;
  -        ch := chr(data);
  -        case ch of
  -          ^C : _alive := false;
  -          ^H : if length(cmdstr) > 0 then
  -                 begin
  -                   SetLength(cmdstr, length(cmdstr)-1);
  -                   dec(curpos);
  -                 end
  -               else pass;
  -          ^M : begin
  -                 self.Invoke(cmdstr); self.Clear
  -               end;
  -        else
  -          cmdstr := cmdstr + ch;
  -          inc(curpos)
  -        end
  -      end
  -    else result := false;
  +function TShellMorph.OnKeyPress( ch : char ) : boolean;
  +  begin
  +    result := true;
  +    case ch of
  +      ^C : _alive := false;
  +      ^H : if length(cmdstr) > 0 then
  +           begin
  +             SetLength(cmdstr, length(cmdstr)-1);
  +             dec(curpos);
  +           end
  +           else pass;
  +      ^M : begin
  +             self.Invoke(cmdstr); self.Clear
  +           end;
  +      else
  +        cmdstr := cmdstr + ch;
  +        inc(curpos)
  +    end
     end;
    
  
positive.code:   arrays,
    vorunati,
    sysutils, // AppendStr, FormatDateTime
    kvm,      // fg, gotoxy, clreol
    cw,       // cxy(color, x, y, string)
    num,      // n2s
  
negative.code:   end;
  
  const
    cmd_quit = -1;
    cmd_step = -2;
    cmd_draw = -3;
    cmd_hide = -4;
    cmd_show = -5;
    cmd_help = -6;
    evt_keych = -25;
  //  evt_keyup = -26;
  //  evt_mosdn = -27;
  //  evt_mosup = -28;
  //  evt_mosmv = -29;
  
  type
    TTagged = class(TInterfacedObject, IMessage)
      protected
        _tag : integer;
        _data : variant;
      public
        function GetTag : integer;
        function GetData : variant;
        property tag : integer read GetTag;
        property data : variant read GetData;
      end;
  
    TSymbol = class(TTagged)
      public
        name : string[32];
      end;
  
    TToken = class(TTagged)
      public
        sym : TSymbol;
        line, column, span : longint;
    end;
  
    TypeKind = ( tkSimple, tkTkUnion, tkFunction, tkSchema );
    TFieldDef = class;
  
    TTypeDef  = class
      public
        size : Word;
        kind : TypeKind;
        numFields : byte;
        first : TFieldDef;
      end;
  
    TFieldDef = class
      public
        next : TFieldDef;
        name : TSymbol;
      end;
  
    TTuple = class
      public
        meta : TTypeDef;
        data : TBytes;
    end;
  
    TMessage = class (TTagged, IMessage)
      sym : TSymbol;
      sender: IActor;
      args: TTuple;
    end;
  
    TEvent  = class (TMessage)
      public
        data : integer;
        constructor Create(etag: integer; e:integer);
      end;
  
  type
    TActor = class (TVorunati<IMessage,void>, IActor)
  