home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
g
/
gset01.zip
/
GSET.C
next >
Wrap
C/C++ Source or Header
|
1993-01-19
|
558b
|
26 lines
#include <ctype.h>
#include <dos.h>
#include <stdlib.h>
void main(int argc, char **argv)
{
char flag, line=1, mic=0, out=2;
char *ptr;
int i, base=512;
ptr = getenv("ULTRASND");
if (ptr == NULL) base=544; // default: 220h (256*2+16*2)
else {
char abase[2];
abase[0]=ptr[0]; abase[1]=0;
base+=(atoi( abase)<<4);
}
if (argc==2)
for(i=0; i<3; i++) {
flag=toupper(argv[1][i]);
if(flag=='M') mic=4;
if(flag=='L') line=0;
if(flag=='O') out=0;
}
outportb( base, mic | line | out);
}