keyboard port 0x64
Posted: Thu Mar 20, 2003 7:04 pm
this function is supposed to check port 0x64 and loop until bit 0 is zero but its not workin...when bit 0 is equal to one it means a key was pressed or released..i think??
anyone know my problem? thank you
/*wait for keyboard buffer will wait for bit 0 of port 0x64 to equal 1.
then we know a key has been pressed or released*/
void wait_kbdbuff()
{
unsigned temp=0x00;
while(temp == 0x00) //while bit 0 is 0
{
temp=portin(0x64);
temp=(temp & 0x01);
};
};
anyone know my problem? thank you
/*wait for keyboard buffer will wait for bit 0 of port 0x64 to equal 1.
then we know a key has been pressed or released*/
void wait_kbdbuff()
{
unsigned temp=0x00;
while(temp == 0x00) //while bit 0 is 0
{
temp=portin(0x64);
temp=(temp & 0x01);
};
};