home *** CD-ROM | disk | FTP | other *** search
- {$m 5000,2000,655000}
- program loadhigh;
-
- uses
- autocopy,uupcase,uexist,dos;
-
- var
- param : ^string;
- s : string;
- b : byte;
-
- begin
- param:=ptr(prefixseg,$80);
- s:=upcasestr(paramstr(1));
- while (param^[1]=' ') and (param^[0]<>#0) do delete(param^,1,1);
- b:=pos(' ',param^);
- if b=0 then b:=length(param^);
- delete(param^,1,b);
- if not exist(s,existfile) then if exist(s+'.exe',existfile) then s:=s+'.EXE'
- else if exist(s+'.com',existfile) then s:=s+'.COM';
- if pos('.EXE',s)+pos('.COM',s)=0 then begin
- writeln('kein programm angegeben');
- exit;
- end;
- exec(s,param^);
- end.
-