home *** CD-ROM | disk | FTP | other *** search
- (*
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓·── ──·▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓│ │░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ Unit was conceived, designed and written ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ by Floor A.C. Naaijkens for ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ UltiHouse Software / The ECO Group. ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ (C) MCMXCII by EUROCON PANATIONAL CORPORATION. ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ All Rights Reserved for The ECO Group. ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓ ░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓│ │░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓·── ──·░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- *)
- {$F+,O+,I-}
-
- unit ECO_dsqv;
-
- interface
-
- uses dos;
-
- type str2 = string[2];
-
- var desqresult : byte;
- desqregs : registers;
- desqversion : word;
-
- function desqviewpresent:boolean;
- procedure starttask(x: str2);
- procedure giveupcpu;
- procedure giveupidle;
- procedure exittask;
-
- implementation
-
- function desqviewpresent;
- begin
- desqresult:=0;
- with desqregs do begin
- ax:=$2b01;
- bx:=0;
- cx:=$4445;
- dx:=$5351;
- msdos(desqregs);
- if bx=2 then bx:=swap(bx);
- if bx=0 then desqviewpresent:=false else desqviewpresent:=true;
- desqversion:=bx;
- end;
- end;
-
- procedure starttask;
- var fn: pathstr;
- pif : array[0..415] of byte;
- f : file;
- begin
- desqresult:=0;
- if (desqviewpresent) and (desqversion>=$200) then begin
- fn:=fsearch(x+'-PIF.DVP',getenv('PATH'));
- if fn='' then begin
- desqresult:=1;
- exit;
- end;
- assign(f,fn);
- reset(f,1);
- if ioresult<>0 then begin
- desqresult:=2;
- exit;
- end;
- if filesize(f)<>416 then begin
- desqresult:=3;
- close(f);
- exit;
- end;
- blockread(f,pif,416);
- if ioresult<>0 then begin
- desqresult:=4;
- close(f);
- exit;
- end;
- close(f);
- with desqregs do begin
- ds:=seg(pif);
- es:=seg(pif);
- di:=ofs(pif);
- bx:=$1a0;
- ax:=$102c;
- intr($15,desqregs);
- if bx=0 then begin
- desqresult:=6;
- exit;
- end;
- end;
- end else
- desqresult:=5;
- end;
-
- procedure giveupcpu;
- begin
- with desqregs do begin
- ax:=$1000;
- intr($15,desqregs);
- end;
- end;
-
- procedure giveupidle;
- begin
- with desqregs do begin
- ah:=1;
- intr($16,desqregs);
- if (flags and fzero) <> 0 then giveupcpu;
- end;
- end;
-
- procedure exittask;
- begin
- if desqviewpresent then intr($19,desqregs);
- desqresult:=1;
- end;
-
- end.
-