xref: /netbsd-src/sys/arch/mvme68k/stand/libbug/putchar.c (revision a07f7c80690d0af05ca7630aebc638f51f3185e1)
1 /*	$NetBSD: putchar.c,v 1.2 2008/01/12 09:54:31 tsutsui 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 "libbug.h"
13 
14 void
putchar(int c)15 putchar(int c)
16 {
17 	char ca[2];
18 
19 	if (c == '\n')
20 		putchar('\r');
21 	ca[0] = c;
22 	mvmeprom_outstr(&ca[0], &ca[1]);
23 }
24