I guess "getchr()" may help you
GETCHR
MODEL & PROTOTYPE:
A: int getchr()
ARGUMENTS:
None
RETURN VALUE:
Value of a character read from the serial port.
DESCRIPTION:
This function reads a single character from the console serial
port, and returns it as a positive value in the range of 0 to 255.
The character is read in "raw" format, with no translations
performed.
EXAMPLES:
while(getchr() != \'\\r\'); /* Wait for a RETURN */
GETCH
MODEL & PROTOTYPE:
A: int getch()
ARGUMENTS:
None
RETURN VALUE:
Value of a character read from the serial port.
DESCRIPTION:
This function reads a single character from the console serial
port, and returns it as a positive value in the range of 0 to 255. If
the character is a carriage return (0x0D), is translated into a
NEWLINE (0x0A) for compatibility with \'C\'.
EXAMPLES:
while(getch() != 0x1B); /* Wait for an ESCAPE character */
GETSTR
MODEL & PROTOTYPE:
S: int getstr(char *buffer, int size)
A: int _getstr(register char *buffer, int size)
ARGUMENTS:
buffer - Pointer to string to receive line
size - Maximum size of line to read
RETURN VALUE:
The number of characters received into the line.
DESCRIPTION:
The "getstr" function reads a string of character from the serial
port and places them into the specified character buffer until either
a NEWLINE character is encountered, or the limit of "size" characters
are read.
The string is terminated with the standard NULL (00) character.
The trailing NEWLINE \'\\n\' character is NOT included in the output
buffer.
The BACKSPACE or DEL keys can be used to edit the input line.
The "buffer" must be located in EXTERNAL memory when the "getstr"
function is used, and INTERNAL memory when the "_getstr" function is
used.
EXAMPLES:
getstr(input_line, 80);