home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c005 / 4.ddi / C / ISSETVEC.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-08-05  |  996 b   |  44 lines

  1. /**
  2. *
  3. * Name        issetvec -- Set interrupt vector
  4. *
  5. * Synopsis    ercode = issetvec(intype,pvector);
  6. *        (Formerly called PCSETVEC.)
  7. *
  8. *        int ercode      1 if interrupt type is outside of
  9. *                    0 to 255 range;
  10. *                  0 if okay.
  11. *        int intype      Interrupt type number
  12. *        ADS *pvector      Structure containing 4-byte address
  13. *                  to install as the value of the
  14. *                  specified vector.
  15. *
  16. * Description    This function sets the interrupt vector of the specified
  17. *        type to the address specified in *pvector.
  18. *
  19. * Returns    ercode          1 if interrupt type is outside of
  20. *                    0 to 255 range;
  21. *                  0 if okay.
  22. *
  23. * Version    3.0  (C)Copyright Blaise Computing Inc.  1983, 1984, 1986
  24. *
  25. **/
  26.  
  27. #include <bisr.h>
  28.  
  29. int issetvec(intype,pvector)
  30. int intype;
  31. ADS *pvector;
  32. {
  33.     DOSREG dos_reg;
  34.  
  35.     if (utrange(intype,0,255))
  36.        return(1);
  37.     dos_reg.ax = utbyword(0x25,intype);
  38.     dos_reg.ds = pvector->s;
  39.     dos_reg.dx = pvector->r;
  40.     dos(&dos_reg);
  41.  
  42.     return(0);
  43. }
  44.