summaryrefslogtreecommitdiff
path: root/reference/C/CONTRIB/SNIP/sound.c
diff options
context:
space:
mode:
Diffstat (limited to 'reference/C/CONTRIB/SNIP/sound.c')
-rwxr-xr-xreference/C/CONTRIB/SNIP/sound.c30
1 files changed, 30 insertions, 0 deletions
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);
+}