while(1) { usleep(500); /* この間隔を変えると 音程が変化する */ tmp = inb(0x61); if ( i++ & 1 ) { tmp = tmp | 0x02; }else{ tmp = tmp & ~0x02;} outb(tmp, 0x61); }