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

  1. /**
  2. *
  3. * Name        utspkoff -- Turn the speaker off
  4. *
  5. * Synopsis    utspkoff();
  6. *
  7. * Description    This function turns the speaker off.  UTSPKOFF can be
  8. *        used in conjunction with UTSPKON to control the speaker.
  9. *        (In fact, the function UTSOUND uses both functions.)
  10. *        UTSPKOFF turns the speaker off by programming Port B of
  11. *        the 8255 speaker chip.
  12. *
  13. * Returns    (None.    Function return type is void.)
  14. *
  15. * Version    3.0 (C)Copyright Blaise Computing Inc. 1984, 1986
  16. *
  17. **/
  18.  
  19. #include <butility.h>
  20.  
  21. #if LAT300
  22. #include <dos.h>              /* Declare inp() and outp().    */
  23. #endif
  24. #if MSC300
  25. #include <conio.h>              /* Declare inp() and outp().    */
  26. #endif
  27.  
  28. #define PB8255      0x61              /* Port B of the 8255 chip      */
  29.  
  30. void utspkoff()
  31. {
  32.     outp(PB8255,inp(PB8255) & ~3);    /* Clear the lower two bits     */
  33.                       /* of Port B.              */
  34. }
  35.