#include"dos.h" #include"stdio.h" void sbreset(); void dachannelon(); void playfile(); void dachanneloff(); main() { sbreset(); dachannelon(); playfile("laugh", 30); dachanneloff(); } void sbreset() { outportb(0x226, 1); /* */ delay(100); /* SB:n resetointi */ outportb(0x226, 0); /* */ delay(100); } void dachannelon() { outportb(0x22c, 0xd1); /* D/A kanava p„„lle */ delay(100); } void playfile(char file[12], int speed) { FILE *fp; int i; char by; fp=fopen(file, "rb"); /* Avataan tiedosto */ by=getc(fp); /* Luetaan ensimm„inen tavu */ while(by!=EOF) { outportb(0x22c, 0x10); for(i=0;i