home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / PASCAL / 30TURUTL / TRUN.PAS < prev    next >
Pascal/Delphi Source File  |  1985-02-18  |  1KB  |  49 lines

  1. {$V-}
  2. Program Trun;
  3. (*
  4. This program is designed to test TURBORUN.COM version 1.0B
  5. *)
  6. Type  String255=String[255];
  7.  
  8. Var   cmdline:String255;
  9.       RetCode:Integer;
  10.       i,x:Integer;
  11.       com:file of byte;
  12.       byt:byte;
  13.  
  14. Procedure GoForIt(Var RC:Integer; Var CommandLine);
  15.           External 'turborun.com'; {Assume Turborun is on default drive}
  16.  
  17.  
  18. Procedure Wait;
  19.   Var ch:char;
  20.   Begin
  21.     Writeln;
  22.     Writeln('Strike any key . . .');
  23.     Read(kbd,ch);
  24. End;
  25.  
  26. Begin
  27.   Wait;
  28.   Repeat
  29.     ClrScr;
  30.     Writeln('Enter command: (type END to halt)');
  31.     Writeln('Examples: command.com /c dir';
  32.     Writeln('          c:command.com /c dir|sort|more>prn';
  33.     Writeln('           or any executable filename';
  34.     Write('>');
  35.     Readln(cmdline);
  36.     If cmdline<>'END' Then
  37.     Begin
  38.       cmdline:=cmdline+#0;
  39.       GoForIT(RetCode,cmdline[1]);
  40.       WriteLn;
  41.       WriteLn('Return code is ',RetCode);
  42.       Wait;
  43.     End;
  44.   Until cmdline='END';
  45.  end.
  46.  
  47.  
  48.  
  49.