[BACK]Return to inchr.c CVS log [TXT][DIR] Up to [local] / sys / arch / mvmeppc / stand / libbug

Annotation of sys/arch/mvmeppc/stand/libbug/inchr.c, Revision 1.1.1.1

1.1       nbrk        1: /*     $OpenBSD: inchr.c,v 1.2 2004/01/24 21:12:38 miod Exp $ */
                      2:
                      3: /*
                      4:  * bug routines -- assumes that the necessary sections of memory
                      5:  * are preserved.
                      6:  */
                      7: #include <sys/types.h>
                      8:
                      9: #include "libbug.h"
                     10:
                     11: /* returns 0 if no characters ready to read */
                     12: int
                     13: getchar()
                     14: {
                     15:        int ret;
                     16:
                     17:        MVMEPROM_CALL(MVMEPROM_INCHR);
                     18:        asm volatile ("mr %0, 3" :  "=r" (ret));
                     19:        return ret;
                     20: }

CVSweb