And I have a bit more info...
It seems the slow BDM colsole I/O is because of two separate reasons:
1. in CW7.0, every character printed results in a "Trap #14"; whereas, in CW6.4, every *line* printed results in a "Trap #14", and
2. in CW7.0, the "Trap #14" seems to have slowed down by 10-20x or so.
Anyway, if I'm printing 50 character lines, printf2(), below, goes 50x faster than printf(), just by doing simple line buffering:
//**************************************************************************
#include <stdarg.h>
#define assert(x) if (! (x)) { asm { halt } }
static
void TERMIO_PutChar2(char ch)
{
static char buffer[128];
static int i;
buffer[i++] = ch;
assert(i <= sizeof(buffer));
if (ch == '\n') {
__write_console(1, buffer, &i, 0L);
i = 0;
}
}
int printf2(const char *, ...);
int printf2(const char *format, ...)
{
int i;
va_list args;
set_printf(TERMIO_PutChar2); /* set up TERMIO_PutChar2 for writing */
va_start(args, format);
i = vprintf(format, args);
va_end(args);
return i;
}
//**************************************************************************