I want to read a character input from the keyboard so I used..
getchar();
peek();
Maybe RTX51 Tiny is the answer of your question. However, I found it too restrictive on calling same function from several tasks (even if the function is reentrant). Maybe RTX51 is the solution, but I wrote a simple scheduler which runs the registered functions with the given periods. This way I can check the keyboard for hits and debounce the keys. But, I do not know if this is the proper way.
Just write your own character fetch routine (http://www.8051.com has a multitude of suggestions). If you are not doing something complicated, do not consider an RTOS it will - if character fetch is your only problem - give you more headaches than writing a character fetch routine. You can write the routine to return 0 or ff if no char is available, if all 256 codes are possible make a global flag character_present set by character fetch, reset by "main" Have fun, Erik