From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/CONTRIB/SNIP/sound.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 reference/C/CONTRIB/SNIP/sound.c (limited to 'reference/C/CONTRIB/SNIP/sound.c') diff --git a/reference/C/CONTRIB/SNIP/sound.c b/reference/C/CONTRIB/SNIP/sound.c new file mode 100755 index 0000000..2979ce5 --- /dev/null +++ b/reference/C/CONTRIB/SNIP/sound.c @@ -0,0 +1,30 @@ +/* +** SOUND.C +** +** Original Copyright 1988-1991 by Bob Stout as part of +** the MicroFirm Function Library (MFL) +** +** This subset version is functionally identical to the +** version originally published by the author in Tech Specialist +** magazine and is hereby donated to the public domain. +*/ + +#include "sound.h" + +void soundon(void) +{ + short value; + + value = inp(SCNTRL); + value |= SOUNDON; + outp(SCNTRL, value); +} + +void soundoff(void) +{ + short value; + + value = inp(SCNTRL); + value &= SOUNDOFF; + outp(SCNTRL, value); +} -- cgit v1.2.3-54-g00ecf