hello
I've been trying to write a "getch()" function using ports but i gets this problem:
when i call this function for the first time it works normally,
i press somekey and the function prints the asciikey,but when i call it
agin it prints the previous asciikey without any input from me!!!
you get it?
first time works normally.
Second time prints the previous char and this is the code:

unsigend char c='\0';
while(c=='\0')
{
c=inportb(0x60);
}
switch(c)
{
case 0x1e:{putch('a');break;}
case 0x03:{putch('b');break;}
.
.
.
.
case 0x2c:{putch('z');break;}
}

so would you please help me
and tell me what's wrong with this code