i've just done a quick test for the 2nd line and have no problems with that

Code:
while(1){
	if(key_w || key_s || key_a || key_d){
		beep();
	}
	wait(1);
}


can't help you any further except maybe your compilers having some issues, but there is no way you can visibly check that... hmmm... smirk