pending = (Stat & S_CON_PENDING) != 0;
Stat &= ~S_CON_PENDING;
}
- if (pending)
- while ((ch = z80_memfifo_getc(fifo_conout)) >= 0)
+ if (pending) {
+ uint8_t count = 100;
+ while ((ch = z80_memfifo_getc(fifo_conout)) >= 0 && --count)
putchar(ch);
+ }
if ((ch = my_getchar(0)) >= 0) {
switch (state) {