program fostest;

uses fos;

var n1 : word;
    n2 : char;
    n3,
    n4 : byte;
    C : BOOLEAN;

begin
   portnum := 1;
   if not openfossil then exit;
   repeat
     GetFosInfo( fosinfo );
     writeln( FossilIdStr );
     write('Baud: ');
     readln(baudrate);
     write('Parity(N,E,O): ');
     readln(parity);
     write('Databits: ');
     readln(databits);
     write('StopBits: ');
     readln(stopbits);
     comm_set_baud(baudrate,parity,databits,stopbits);
     getfosinfo(fosinfo);
     n1 := com_baud(fosinfo.baud);
     n2 := com_parity(fosinfo.baud);
     n3 := com_data(fosinfo.baud);
     n4 := com_stop(fosinfo.baud);
     writeln('-----------------');
     writeln('baud ',n1);
     writeln('parity ',n2);
     writeln('data ',n3);
     writeln('stop ',n4);
     c := fos.carrier;
     writeln('Carrier ', c);
   until n1=300;
end.
