home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
pc
/
opus
/
opin103d.lzh
/
D_COM1.PAS
next >
Wrap
Pascal/Delphi Source File
|
1989-12-03
|
3KB
|
71 lines
Program Demo_Com1;
{***************************************************************************}
{* *}
{* O p u s I n t e r f a c e V e r 1.03 Demo Program. *}
{* *}
{* Opus V 1.0x Interface for Turbo Pascal Ver 4.0, 5.0 and 5.5 *}
{* *}
{* These Structures,Procedures and Functions may help you to make OPUS *}
{* utilities for to help other SysOps, Please read the Documentation. *}
{* *}
{* Regards *}
{* Per Holm *}
{* *}
{* FIDO: Per Holm - Asgaard BBS 2:230/22.0 *}
{* UUCP: perholm@daimi.DK *}
{* *}
{***************************************************************************}
{***************************************************************************}
{* *}
{* Demo of the level 3 communication routines... *}
{* *}
{***************************************************************************}
Uses
OPINT;
VAR
c:char;
i: Integer;
ComIn,ComOut: Text;
Line: String[80];
PROCEDURE IOCheck;
BEGIN
IF IOResult>0 THEN
BEGIN
Writeln('IOError');
Halt;
END;
END;
BEGIN
_Snoop:=_On; { Look at this... }
_KeyBoard:=_On; { Enable Keyboard }
_ExitCarrier:=0; { Don't exit on Carrier change }
AssignFossil(ComIn,0,0); { Assign for input Don;t }
Reset(ComIn); { change BaudRate }
IOCheck;
AssignFossil(ComOut,0,0); { Here's a device to write to }
rewrite(ComOut);
IOCheck;
WriteLn(ComOut,'Hi Johnny, Enter a line of text');
IOCheck;
Readln(ComIn,Line);
IOCheck;
Writeln(ComOut,'OK here we go : "',Line,'"');
IOCheck;
IF FossilCarrier(ComIn) THEN
Writeln('Carrier OK');
write(ComOut,'Thanx Press Enter');
IOCheck;
repeat
until ReadFossil(ComIn)=#13;
writeln(ComOut);
IOCheck;
END.