home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name issetvec -- Set interrupt vector
- *
- * Synopsis ercode = issetvec(intype,pvector);
- * (Formerly called PCSETVEC.)
- *
- * int ercode 1 if interrupt type is outside of
- * 0 to 255 range;
- * 0 if okay.
- * int intype Interrupt type number
- * ADS *pvector Structure containing 4-byte address
- * to install as the value of the
- * specified vector.
- *
- * Description This function sets the interrupt vector of the specified
- * type to the address specified in *pvector.
- *
- * Returns ercode 1 if interrupt type is outside of
- * 0 to 255 range;
- * 0 if okay.
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
- *
- **/
-
- #include <bisr.h>
-
- int issetvec(intype,pvector)
- int intype;
- ADS *pvector;
- {
- DOSREG dos_reg;
-
- if (utrange(intype,0,255))
- return(1);
- dos_reg.ax = utbyword(0x25,intype);
- dos_reg.ds = pvector->s;
- dos_reg.dx = pvector->r;
- dos(&dos_reg);
-
- return(0);
- }