/* Read a character (non-blocking) from the PDC console, returns -1 if key is not present.  */
int pdc_iodc_getc(void)
/* Read a character (non-blocking) from the PDC console, returns -1 if key is not present.  */
int pdc_iodc_getc(void)
{
	int ch;
	int status;
	unsigned long flags;
	if (!PAGE0->mem_kbd.iodc_io)
		return 0;
	spin_lock_irqsave(&pdc_lock, flags);
	real32_call(PAGE0->mem_kbd.iodc_io,
		    (unsigned long)PAGE0->mem_kbd.hpa, ENTRY_IO_CIN,
		    PAGE0->mem_kbd.spa, __pa(PAGE0->mem_kbd.dp.layers), 
		    __pa(iodc_retbuf), 0, __pa(iodc_dbuf), 1, 0);
	ch = *iodc_dbuf;
	status = *iodc_retbuf;
	spin_unlock_irqrestore(&pdc_lock, flags);
	if (status == 0)
	    return -1;
	return ch;
}