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);
};
};
keyboard port 0x64
-
Chris Giese
Re:keyboard port 0x64
It looks OK to me.
Maybe put this code and the code for portin() into one file, compile the file (do not link), then disassemble the object file to see if it's correct: objdump --disassemble --reloc file.o
Maybe put this code and the code for portin() into one file, compile the file (do not link), then disassemble the object file to see if it's correct: objdump --disassemble --reloc file.o