(* Release 3.10 *) (*-------------------------------------------------------------------------* * * * MINITERM.MOD - COMMS Toolkit demonstration program * * * * COPYRIGHT (C) 1988..1992 Clarion Software Corporation. * * All Rights Reserved * * * *--------------------------------------------------------------------------*) MODULE MiniTerm; IMPORT RS232,Window,IO; CONST Port = 2; Baud = 2400; Bits = 8; Stops = 1; Parity = RS232.None; VAR c : CHAR; BEGIN Window.Clear; RS232.SelectPort(Port); RS232.InitPort(Baud,Bits,Stops,Parity); RS232.Install; LOOP WHILE RS232.SerialRead(c,0) DO (* test remote *) IO.WrChar(c); END; IF IO.KeyPressed() THEN c := IO.RdKey(); IF c=0C THEN (* special key? *) c := IO.RdKey(); IF c=CHR(68) THEN (* function key 10 *) EXIT; END; ELSE RS232.SerialWrite(c,1); END; END; END; RS232.UnInstall; END MiniTerm.