home *** CD-ROM | disk | FTP | other *** search
/ TopWare Tools / TOOLS.iso / tools / top1318 / gepackt.exe / UTILITY / SOURCE / LOADHI.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-01-03  |  663 b   |  27 lines

  1. {$m 5000,2000,655000}
  2. program loadhigh;
  3.  
  4.   uses
  5.     autocopy,uupcase,uexist,dos;
  6.  
  7.   var
  8.     param : ^string;
  9.     s : string;
  10.     b : byte;
  11.  
  12.   begin
  13.     param:=ptr(prefixseg,$80);
  14.     s:=upcasestr(paramstr(1));
  15.     while (param^[1]=' ') and (param^[0]<>#0) do delete(param^,1,1);
  16.     b:=pos(' ',param^);
  17.     if b=0 then b:=length(param^);
  18.     delete(param^,1,b);
  19.     if not exist(s,existfile) then if exist(s+'.exe',existfile) then s:=s+'.EXE'
  20.     else if exist(s+'.com',existfile) then s:=s+'.COM';
  21.     if pos('.EXE',s)+pos('.COM',s)=0 then begin
  22.       writeln('kein programm angegeben');
  23.       exit;
  24.     end;
  25.     exec(s,param^);
  26.   end.
  27.