2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
11 __asm__ __volatile__ ("inb $" #port ",%%al":"=a"(__value)); \
14 #define outb(val,port) \
15 ({ char __value=(val); \
16 __asm__ __volatile__ ("outb %%al,$" #port::"a"(__value)); })
19 #define SetSpkFreq(freq) \
22 WORD counter = 0x1234DD / freq; \
24 outb ((UBYTE) (counter & 0x00FF), 0x42); \
25 outb ((UBYTE) ((counter & 0xFF00) >> 8), 0x42); \
29 #define SpkOn() outb (inb(0x61) | 3, 0x61)
31 #define SpkOff() outb (inb(0x61) & ~3, 0x61)
33 #define Sound(freq,loop) \
38 for (i = 0; i < loop; dummy = i*i, i++);\
42 #endif /* _SPEAKER_H */