PROGRAM xxx_processor_main (input, output);
USES base, xxx_processor_unit;
var h           : xxx_processor_handle_t;
    ac, err     : integer;
    a, src, dst_unit: path_name_t;

procedure write_help (s : err_str_t);
  begin
    writeln (StdErr, 'Usage : ' + ParamStr (0) + '[src [dst_unit [dest_main]]]')
  end;

begin
  src:= ''; dst_unit:= '';
  for ac:=1 to ParamCount do
    begin
      a:= ParamStr (ac);
      if src = '' then src:= a
         else if dst_unit='' then dst_unit:=a
         else write_help ('Too many parameters')
    end;
  xxx_processor_open  (h, '');
  xxx_processor_use   (h, src, dst_unit, err);
  xxx_processor_close (h)
end.
