home *** CD-ROM | disk | FTP | other *** search
- program TestCom;
-
- uses TPDos,
- TPCrt,
- printer,
- TpInt,
- ComPort,
- TpString;
-
- var
- Port,
- Params: word;
- S: string;
- Ch: char;
-
- begin
-
- ClrScr;
- writeln;
- writeln;
- Port := Com1Port;
- Params := Baud9600 + NoParity + WordSize8 + StopBits1;
- if OpenCom( Port, Params ) then;
- while not KeyPressed do begin
- with Async do if Head <> Tail then begin
- Ch := ReadCom;
- if Ch = #$88 then begin
- gotoXY( 1, 1);
- writeln( Head:6, Tail:6 );
- writeln;
- end;
- if WhereX > 46 then begin
- writeln;
- ClrEOL;
- end;
- write( HexB( byte(Ch) ), ' ' );
- end; {with ...}
- end; {while not KeyPressed}
- end.