1 /* $NetBSD: inchr.c,v 1.4 2008/01/12 09:54:31 tsutsui Exp $ */ 2 3 /* 4 * bug routines -- assumes that the necessary sections of memory 5 * are preserved. 6 */ 7 #include <sys/types.h> 8 #include <machine/prom.h> 9 10 #include <lib/libsa/stand.h> 11 #include "libbug.h" 12 13 /* returns 0 if no characters ready to read */ 14 int 15 getchar(void) 16 { 17 int ret; 18 19 MVMEPROM_NOARG(); 20 MVMEPROM_CALL(MVMEPROM_INCHR); 21 MVMEPROM_RETURN_BYTE(ret); 22 } 23