home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1996 September
/
PCWK996.iso
/
demo
/
wgelectr
/
pk51demo
/
files.2
/
EXAMPLES
/
SAMPL517
/
GETKEY.C
< prev
next >
Wrap
C/C++ Source or Header
|
1995-06-08
|
1KB
|
28 lines
/***********************************************************************/
/* 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);
}