home *** CD-ROM | disk | FTP | other *** search
- #include <dos.h>
- #define LOCAL
- #include "playrint.h"
-
- char playrid[8] = "Play/R "; /* PlayR id string */
- int tessmpx = 0x5453; /* TesSeRact multiplex id */
- int idnum; /* Play/R id number */
- char param [64]; /* Parameter block */
- union REGS reg; /* Machine registers */
- struct SREGS sreg;
-
- int checkres ()
-
- /* Check Play/R is loaded - returns id number if found, else -1 */
-
- {
- reg.x.ax = tessmpx; /* ax = Tess int 2fh muliplex id */
- sreg.ds = FP_SEG(playrid); /* ds = id string segment */
- reg.x.si = FP_OFF(playrid); /* si = id string offset */
- reg.x.cx = 0; /* cx = Tess id counter - must be 0 */
- reg.x.bx = 0; /* bx = Tess check resident function */
- int86x(0x2f, ®, ®, &sreg); /* Call int 2fh */
- if (reg.x.ax == 0xffff)
- idnum = reg.x.cx; /* Found - return tsr id */
- else
- idnum = -1; /* Not loaded */
- return idnum;
- }
-
- void 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. */
-
- {
- reg.x.ax = tessmpx; /* ax = Tess multiplex id */
- sreg.es = FP_SEG(param); /* es = parameter segment */
- reg.x.di = FP_OFF(param); /* di = parameter offset */
- reg.x.cx = idnum; /* cx = PlayR id number */
- reg.x.bx = 0x20; /* bx = Tess call user function */
- int86x(0x2f, ®, ®, &sreg); /* Call int 2fh */
- }
-