1*a07f7c80Stsutsui /* $NetBSD: instat.c,v 1.3 2008/01/12 09:54:31 tsutsui Exp $ */ 2eabb97daSchuck 3eabb97daSchuck /* 4eabb97daSchuck * bug routines -- assumes that the necessary sections of memory 5eabb97daSchuck * are preserved. 6eabb97daSchuck */ 7eabb97daSchuck #include <sys/types.h> 8eabb97daSchuck #include <machine/prom.h> 9eabb97daSchuck 1094e848e8Schuck #include "libbug.h" 1194e848e8Schuck 12eabb97daSchuck /* returns 0 if no characters ready to read */ 13eabb97daSchuck int peekchar(void)14*a07f7c80Stsutsuipeekchar(void) 15eabb97daSchuck { 16eabb97daSchuck int ret; 17eabb97daSchuck 1894e848e8Schuck MVMEPROM_NOARG(); 19eabb97daSchuck MVMEPROM_CALL(MVMEPROM_INSTAT); 20eabb97daSchuck MVMEPROM_STATRET(ret); 21eabb97daSchuck } 22