home *** CD-ROM | disk | FTP | other *** search
- {
- Example terminal program created using FOSCOM routines
- Copyright (c) 1989 by Ronen Magid. ACL
- }
-
- Program Eterm;
- Uses Crt,FosCom;
-
- Var
- ChOUT,ChIN: Char;
-
-
- begin
- Fos_Init(1); { Init the Fossil Driver }
- Fos_Parms(1,1200,8,'N',1); { Set Parameters to 1200,8,N,1}
- Clrscr;
- textcolor (14);
- writeln ('Terminal Ready. COM1 1200-8-N-1. ANSI EMULATION');
- textcolor (12);
- writeln ('---------------------------------------------------------------');
- textcolor (11);
- writeln;
- writeln ('You may press "@" to exit.');
- writeln;
- repeat
- if keypressed then begin { If a key was pressed then...}
- ChOUT:=readkey; { Read it....}
- Fos_Write(1,ChOUT); { And shoot it via COM1...}
- end;
-
- If Fos_Avail(1) then begin { If char waiting in incoming buffer }
- ChIN:=Fos_Receive(1); { Then read it (1=Com1) }
- Fos_Ansi(ChIN); { and write it via ANSI }
- end;
-
- until chout='@'; { Until the user presses @ }
- Fos_Close(1); { Close the Fossil driver (COM1) }
- end.
-