home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************************/
- /* Copyright 1995 KEIL Software, Inc. */
- /***********************************************************************/
- /* */
- /* PUTCHAR.C: This routine is the general character input of C51. */
- /* */
- /* To translate this file use C51 with the following invocation: */
- /* */
- /* C51 GETKEY.C */
- /* */
- /* To link the modified GETKEY.OBJ file to your application use the */
- /* following BL51 invocation: */
- /* */
- /* BL51 <your object file list>, GETKEY.OBJ <controls> */
- /* */
- /***********************************************************************/
-
- #include <reg517.h>
-
- char _getkey () {
- char c;
-
- while (!(S1CON & 0x01));
- c = S1BUF;
- S1CON &= 0xFE; /* RI = 0 */
- return (c);
- }
-