Program CommTest;



uses

  Comm,

  Glob,

  Crt;



var

  InKey: char;



begin

  Comm.SetupSerialPort(1200);

  repeat

    if Comm.InStat then

      write(Comm.InChar);

    if KeyPressed then

      begin

        InKey := readkey;

        case InKey of

          ESC:  halt;

          else

            Comm.OutChar(readkey);

        end; {case}

      end;

  until false;

end.