#include <stdio.h> main(){ unsigned long f, f1, f2, p, i; char c; int a[17]={1320,524, 588, 660, 694, 784, 880, 988, 1048, 1176, 262, 294, 330, 347, 392, 440, 494}; while((c = getch()) != 0x1b){ if(c<='9' && c>='0') i=c-0x30; switch(c){ case 'q':{i=10;break;} case 'w':{i=11;break;} case 'e':{i=12;break;} case 'r':{i=13;break;} case 't':{i=14;break;} case 'y':{i=15;break;} case 'u':{i=16;break;} } f=1193280/a[i]; f2=f/256; f1=f%256; outportb(0x43,0xb6); outportb(0x42,f1); outportb(0x42,f2); p=inportb(0x61); outportb(0x61, p|3);
} p=inportb(0x61)&~3; outportb(0x61,p); }
|