Annotation of sys/arch/mvme88k/stand/libbug/putchar.c, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: putchar.c,v 1.4 2006/05/16 22:51:30 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: #include <machine/prom.h>
10:
11: #include "stand.h"
12: #include "prom.h"
13:
14: void
15: putchar(c)
16: int c;
17: {
18: char ca;
19: ca = (char)c & 0xFF;
20: if (ca == '\n')
21: putchar('\r');
22: asm volatile ("or r2,r0,%0" : : "r" (ca));
23: MVMEPROM_CALL(MVMEPROM_OUTCHR);
24: }
CVSweb