xref: /netbsd-src/sys/arch/news68k/stand/common/putchar.c (revision b87210fa510e6eecfd48e218f3aefcb05cbe4636)
1*b87210faStsutsui /*	$NetBSD: putchar.c,v 1.4 2008/05/14 13:29:28 tsutsui Exp $	*/
2a1099430Stsutsui 
3a1099430Stsutsui /*-
4*b87210faStsutsui  * Copyright (c) 1999 Izumi Tsutsui.  All rights reserved.
5*b87210faStsutsui  *
6*b87210faStsutsui  * Redistribution and use in source and binary forms, with or without
7*b87210faStsutsui  * modification, are permitted provided that the following conditions
8*b87210faStsutsui  * are met:
9*b87210faStsutsui  * 1. Redistributions of source code must retain the above copyright
10*b87210faStsutsui  *    notice, this list of conditions and the following disclaimer.
11*b87210faStsutsui  * 2. Redistributions in binary form must reproduce the above copyright
12*b87210faStsutsui  *    notice, this list of conditions and the following disclaimer in the
13*b87210faStsutsui  *    documentation and/or other materials provided with the distribution.
14*b87210faStsutsui  *
15*b87210faStsutsui  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16*b87210faStsutsui  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17*b87210faStsutsui  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18*b87210faStsutsui  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19*b87210faStsutsui  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20*b87210faStsutsui  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21*b87210faStsutsui  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22*b87210faStsutsui  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23*b87210faStsutsui  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24*b87210faStsutsui  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*b87210faStsutsui  */
26*b87210faStsutsui 
27*b87210faStsutsui /*-
28a1099430Stsutsui  * Copyright (C) 1999 Tsubai Masanari.  All rights reserved.
29a1099430Stsutsui  *
30a1099430Stsutsui  * Redistribution and use in source and binary forms, with or without
31a1099430Stsutsui  * modification, are permitted provided that the following conditions
32a1099430Stsutsui  * are met:
33a1099430Stsutsui  * 1. Redistributions of source code must retain the above copyright
34a1099430Stsutsui  *    notice, this list of conditions and the following disclaimer.
35a1099430Stsutsui  * 2. Redistributions in binary form must reproduce the above copyright
36a1099430Stsutsui  *    notice, this list of conditions and the following disclaimer in the
37a1099430Stsutsui  *    documentation and/or other materials provided with the distribution.
38a1099430Stsutsui  * 3. The name of the author may not be used to endorse or promote products
39a1099430Stsutsui  *    derived from this software without specific prior written permission.
40a1099430Stsutsui  *
41a1099430Stsutsui  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
42a1099430Stsutsui  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
43a1099430Stsutsui  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
44a1099430Stsutsui  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
45a1099430Stsutsui  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
46a1099430Stsutsui  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
47a1099430Stsutsui  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
48a1099430Stsutsui  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
49a1099430Stsutsui  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
50a1099430Stsutsui  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
51a1099430Stsutsui  */
52a1099430Stsutsui 
53a1099430Stsutsui #include <lib/libkern/libkern.h>
54a1099430Stsutsui #include <lib/libsa/stand.h>
55a1099430Stsutsui #include <machine/romcall.h>
56a1099430Stsutsui 
57a1099430Stsutsui void
putchar(int x)5852b46dcfStsutsui putchar(int x)
59a1099430Stsutsui {
60a1099430Stsutsui 	char c = x;
61a1099430Stsutsui 
62a1099430Stsutsui 	rom_write(1, &c, 1);
63a1099430Stsutsui }
64