Restructured according to review in pull request #567.
The "inputc" function was moved in slightly modified form
to kbhit.s and replaces the old keyboard scanner.
cgetc() uses the new kbhit() to read a character.
If kbhit() detects that a key is pressed, it fetches and
buffers the character. If cgetc() detects a buffered character,
this one is returned instead of fetching one with the PROM
routine.