home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / s / sltpu70a.zip / TEST.PAS < prev    next >
Pascal/Delphi Source File  |  1992-04-24  |  2KB  |  86 lines

  1.  
  2. Program Test;
  3.  
  4.    { Test Modem Interface unit. This program should be run as a
  5.      'Standard' type door under Searchlight BBS, during a remote login.
  6.      TEST.EXE should be executed directly from a menu or DOORS.DEF line. }
  7.  
  8. Uses Modem,Crt;
  9.  
  10. var c: char;
  11.  
  12.    Procedure Pause;
  13.    var c: char;
  14.    Begin
  15.      write('Press any key to continue --');
  16.      c:=readkey;
  17.    end;
  18.  
  19.  
  20. Begin
  21.   DirectVideo:=false;
  22.  
  23.   if not DriverLoaded then begin
  24.     writeln('Searchlight drivers not available.');
  25.     halt;
  26.   end;
  27.  
  28.   if (SLData=Nil) or (SLData^.RSAct=FALSE) then begin
  29.     writeln('Please run this program as a "Standard" type door during a remote login.');
  30.     halt;
  31.   end;
  32.  
  33.   writeln('Testing modem driver library features. The following lines of');
  34.   writeln('text should appear on both the local and remote terminal.');
  35.   writeln;
  36.   pause;
  37.  
  38.   writeln;
  39.   writeln;
  40.   writeln('Now we will demonstrate the ability to write a line directly to');
  41.   writeln('the COM port without local display.');
  42.   writeln;
  43.   writeln(Auxout,'(This line should appear only on the remote end!)');
  44.   pause;
  45.  
  46.   writeln;
  47.   writeln;
  48.   writeln('I can tell from the last key you pressed that you are sitting');
  49.   if SLData^.Lastkey
  50.     then writeln('at the LOCAL terminal.')
  51.     else writeln('at the REMOTE terminal.');
  52.   pause;
  53.  
  54.   writeln;
  55.   writeln;
  56.   writeln('Now let''s try sending a clear screen sequence directly to the');
  57.   writeln('remote terminal. We''ll do it right after you press a key.');
  58.   writeln;
  59.   pause;
  60.   write(auxout,#27'[2J');   { ESC2J is ANSI escape sequence to clear screen }
  61.  
  62.   writeln;
  63.   writeln('I bet that your screen is clear now if you were sitting at the');
  64.   writeln('remote end, but not if you are at the local end.');
  65.   writeln;
  66.   writeln;
  67.   writeln('Let''s try displaying a line that appears only on the local screen.');
  68.   writeln('We''ll call the COMTOGGLE procedure to shut off BIOS redirection.');
  69.   writeln;
  70.   ComToggle;
  71.   writeln('This line should appear only on the local end.');
  72.   ComToggle;
  73.   pause;
  74.  
  75.   writeln;
  76.   writeln;
  77.   writeln('This concludes our test.');
  78.   write('Would you like to hang up now? (Y/N) ');
  79.   c:=readkey; writeln(c);
  80.  
  81.   if Upcase(c)='Y' then begin
  82.     WaitOut;
  83.     Hangup;
  84.   end;
  85.  
  86. end.