4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-24 01:29:34 +08:00
newlib-cygwin/libgloss/m68k/bdm-outbyte.c
Nathan Sidwell 017a82abc6 * libgloss/m68k/Makefile.in (BDM_BSP, BDM_OBJS, BDM_ISRS): New.
(CF_SCRIPTS): Rename dbug scripts.  Add bdm scripts. Add m5485
	scripts.
	(all): Add new targets.
	(BDM_BSP): New target.
	(bdm-isv.o, bdm-exit.o, bdm-outbyte.o, bdm-semihost.o): New
	targets.
	(BDM_ISRS): New targets.
	(m5208evb.ld, m5213evb.ld, m5235evb.ld, m5272c3.ld, m5282evb.ld):
	Rename and adjust.
	(m5485evb-dbug): New.
	(m5208evb-bdm.ld, m5213evb-bdm.ld, m5235evb-bdm.ld,
	m5272c3-bdm.ld, m5282evb-bdm.ld, m5485evb-bdm.ld): New.
	(install): Add BDM_BSP.
	* libgloss/m68k/bdm-exit.c: New
	* libgloss/m68k/bdm-inbyte.c: New
	* libgloss/m68k/bdm-outbyte.c: New
	* libgloss/m68k/bdm-semihost.c: New
	* libgloss/m68k/bdm-semihost.h: New
	* libgloss/m68k/bdm-isrs.c: New.
	* libgloss/m68k/bdm-isv.c: New.
	* cf-dbug.sc: Renamed to ...
	* cf.sc: ... here.  Add bdm flexibility. Remove GROUP
2006-03-29 07:03:19 +00:00

33 lines
1023 B
C

/*
* bdm-outbyte.c --
*
* Copyright (c) 2006 CodeSourcery CSI
*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
#include "bdm-semihost.h"
/*
* outbyte -- output a byte to a console.
*/
void outbyte (char c)
{
int code = c & 0xff;
__asm__ __volatile__ ("move.l %0,%/" BDM_ARG_REG "\n"
"moveq %1,%/" BDM_FUNC_REG "\n"
"trap %2"
:: "rmi" (code), "n" (BDM_PUTCHAR), "n" (BDM_TRAP)
: BDM_FUNC_REG,BDM_ARG_REG,BDM_RESULT_REG,"memory");
}