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

Annotation of sys/arch/mvmeppc/stand/libbug/putchar.c, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: putchar.c,v 1.2 2004/01/24 21:12:38 miod Exp $ */
        !             2:
        !             3: /*
        !             4:  * putchar: easier to do this with outstr than to add more macros to
        !             5:  * handle byte passing on the stack
        !             6:  */
        !             7:
        !             8: #include <sys/types.h>
        !             9:
        !            10: #include "libbug.h"
        !            11:
        !            12: void
        !            13: putchar(c)
        !            14:        int c;
        !            15: {
        !            16:        char ca;
        !            17:        ca = (char)c & 0xFF;
        !            18:        if (ca == '\n')
        !            19:                putchar('\r');
        !            20:
        !            21:        asm  volatile ("mr 3, %0" :: "r" (ca));
        !            22:        MVMEPROM_CALL(MVMEPROM_OUTCHR);
        !            23: }

CVSweb