diff options
Diffstat (limited to 'sys/arch/mvme88k/stand/openbsd/libbug/m88k/instat.c')
-rw-r--r-- | sys/arch/mvme88k/stand/openbsd/libbug/m88k/instat.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/arch/mvme88k/stand/openbsd/libbug/m88k/instat.c b/sys/arch/mvme88k/stand/openbsd/libbug/m88k/instat.c new file mode 100644 index 00000000000..0ac97fe7676 --- /dev/null +++ b/sys/arch/mvme88k/stand/openbsd/libbug/m88k/instat.c @@ -0,0 +1,17 @@ +/* + * bug routines -- assumes that the necessary sections of memory + * are preserved. + */ +#include <sys/types.h> +#include <machine/prom.h> + +/* returns 0 if no characters ready to read */ +int +mvmeprom_instat() +{ + short ret; + + MVMEPROM_CALL(MVMEPROM_INSTAT); + asm volatile ("or %0,r0,r2" : "=r" (ret)); + return (!(ret & 0x4)); +} |