#include <stdio.h>
#define _SCI
#include <hcs12dp256.h>

extern int _textmode;

int putchar(char c)
	{
	if (_textmode && c == '\n')
		putchar('\r');
	while ((SC0SR1 & TDRE) == 0)
		;
	SC0DRL = c;
	return c;
	}
