home *** CD-ROM | disk | FTP | other *** search
- unit playrint;
-
- interface
-
- function checkres: integer;
- procedure callplayr;
-
- var
- param: array [0..63] of byte; {Play/R parameter data}
-
- implementation
-
- uses dos;
-
- const
- playrid: array [0..7] of char = 'Play/R '; {PlayR id string}
-
- tessmpx = $5453; {hex} {TesSeRact multiplex id}
-
- var
- reg: registers; {CPU register set}
- idnum: integer; {Play/R id number}
-
- function checkres: integer;
-
- { Check Play/R is loaded - returns id number if found, else -1 }
-
- begin
- reg.ax := tessmpx; {ax = Tess int 2fh
- muliplex id}
- reg.ds := seg(playrid); {ds = id string segment}
- reg.si := ofs(playrid); {si = id string offset}
- reg.cx := 0; {cx = Tess id counter -
- must be 0}
- reg.bx := 0; {bx = Tess check resident
- function}
- intr($2f, reg); {Call int 2fh}
- if reg.ax = $ffff then
- idnum := reg.cx {Found - return tsr id}
- else
- idnum := -1; {Not loaded}
- checkres := idnum;
- end;
-
- procedure callplayr;
-
- { Call Play/R using the contents of the byte array "param".
- Byte 0 is the function code, and the rest is any required
- data. }
-
- begin
- reg.ax := tessmpx; {ax = Tess multiplex id}
- reg.es := seg(param); {es = parameter segment}
- reg.di := ofs(param); {di = parameter offset}
- reg.cx := idnum; {cx = PlayR id number}
- reg.bx := $20; {bx = Tess call user
- function}
- intr($2f, reg); {Call int 2fh}
- end;
-
- end.
-