uses
  ChnVirt,
{  ,
  Chn,
  ChnCom,

  ChnCom2,

  ChnMBox,
  ChnPrt,
  ChnLecom,
}
  Crt,
  NumToStr;

const
  MaxTs = {21}32;
  Ts : array[1..MaxTs]of tString5=(
  'VIRT',
  'CHN',
  'COM',
  'COM2',
  'V40',
  'V40P',
  'MOD',
  'RAC',
  'ARC',
  'COMW',
  'DMS01',
  'MBOX',
  'PRT',
  'PRT2',
  'LECOM',
  'EB',
  'EBSL',
  'MODB',
  'TECOM',
  'SBUS',
  'FVRMA',
  'x1',
  'x2',
  'x3',
  'x4',
  'x5',
{
  'x1',
  'x2',
  'x3',
  'x4',
  'x5',
  'x6'
}
  'x6',
  'x7',
  'x8',
  'x9',
  'x10',
  'PEPIK'
);


var
  Tw : array[1..MaxTs]of Word;

var
  i  : Word;
  Ch : pChnVirt;

begin
{
  AddChnVirt;
  AddChn;
  AddChnCom;

  AddChnCom2;

  AddChnMBox;
  AddChnPrt;
  AddChnLecom;
}
  New(Ch,Init);
  if Ch=nil then RunError(203);

  Ch^.ChSetParam('DNAME=PEPIK');

  WriteLn;
  WriteLn('Test funkce ChNumName');
  WriteLn;
  for i:=1 to MaxTs do
  begin
    Tw[i]:=Ch^.CHNumName(Ts[i]);
    WriteLn(Copy(Ts[i]+'      ',1,5)+' = ',Tw[i]:5,' $'+WordStrHex(Tw[i]));
  end;
  WriteLn(Ch^.CHNumName('VIRT'));
  WriteLn(Ch^.CHNumName('PEPIK'));
  WriteLn(Ch^.CHName(256));
  WriteLn(Ch^.CHAllName);
  WriteLn(Ch^.CHAllNumName);
end.
