xref: /netbsd-src/sys/arch/pmax/stand/common/getchar.S (revision 1c53db4943d20877bb426d2c771d85ee4b357fe6)
1*1c53db49Stsutsui/*	$NetBSD: getchar.S,v 1.5 2011/03/26 15:49:26 tsutsui Exp $	*/
2326cce3cSsimonb
3326cce3cSsimonb/*-
4326cce3cSsimonb * Copyright (c) 1999 The NetBSD Foundation, Inc.
5326cce3cSsimonb * All rights reserved.
6326cce3cSsimonb *
7326cce3cSsimonb * This code is derived from software contributed to The NetBSD Foundation
8326cce3cSsimonb * by Jonathan Stone, Michael Hitch and Simon Burge.
9326cce3cSsimonb *
10326cce3cSsimonb * Redistribution and use in source and binary forms, with or without
11326cce3cSsimonb * modification, are permitted provided that the following conditions
12326cce3cSsimonb * are met:
13326cce3cSsimonb * 1. Redistributions of source code must retain the above copyright
14326cce3cSsimonb *    notice, this list of conditions and the following disclaimer.
15326cce3cSsimonb * 2. Redistributions in binary form must reproduce the above copyright
16326cce3cSsimonb *    notice, this list of conditions and the following disclaimer in the
17326cce3cSsimonb *    documentation and/or other materials provided with the distribution.
18326cce3cSsimonb *
19326cce3cSsimonb * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20326cce3cSsimonb * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21326cce3cSsimonb * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22326cce3cSsimonb * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23326cce3cSsimonb * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24326cce3cSsimonb * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25326cce3cSsimonb * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26326cce3cSsimonb * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27326cce3cSsimonb * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28326cce3cSsimonb * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29326cce3cSsimonb * POSSIBILITY OF SUCH DAMAGE.
30326cce3cSsimonb */
31326cce3cSsimonb
32326cce3cSsimonb#include <mips/asm.h>
33326cce3cSsimonb#include <mips/cpuregs.h>
34326cce3cSsimonb#include <machine/dec_prom.h>
35326cce3cSsimonb
36*1c53db49Stsutsui	.set	reorder		# make as(1) handle hazard and BDslot
37326cce3cSsimonbLEAF(getchar)
38326cce3cSsimonb	lw	v0, _C_LABEL(callv)	# get pointer to call back vectors
39326cce3cSsimonb	lw	v0, 0x24(v0)	# offset for callv->_getchar
40326cce3cSsimonb	j	v0		# call PROM getchar
41326cce3cSsimonbEND(getchar)
42