diff options
Diffstat (limited to 'sys/arch/mvme68k/stand/libbug/m68k/instat.c')
-rw-r--r-- | sys/arch/mvme68k/stand/libbug/m68k/instat.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/arch/mvme68k/stand/libbug/m68k/instat.c b/sys/arch/mvme68k/stand/libbug/m68k/instat.c new file mode 100644 index 00000000000..5e2f2d3e69e --- /dev/null +++ b/sys/arch/mvme68k/stand/libbug/m68k/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() +{ + u_short ret; + + MVMEPROM_CALL(MVMEPROM_INSTAT); + asm volatile ("movew ccr,%0": "=d" (ret)); + return (!(ret & 0x4)); +} |