Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
As you can see it should return the last charecter the user inputs.
buf is the buffer the charecter is stored in, kbdus is a list of charecter values, curkey is the current scancode value and rkey is 1 if the return key is pressed. But it just seems to return nothing, and I don't know why? Any ideas? its probably a really stupid mistake....
Why are you doing puts() and writing a NULL string? You can set "buf" to 0 rather than "" (although they should be the same thing).
What is "rkey"? If "rkey" is changed before "curkey" then it will return while "buf" is still NULL. If you are changing both values in the ISR then you have probably created a race condition where EIP is just after the If, "rkey" is changed then the ISR returns, the while checks "rkey" and leaves without the If executing.