From d5cc3406b6286351ede9d084b7aec5c95131b5ab Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Thu, 21 Jan 2021 07:56:59 -0800 Subject: [PATCH] PDP10: Avoid console port input overrun - wait until prior input is processed This will allow cut-and-paste into KS10 simulator console session. As discussed in #999 --- PDP10/pdp10_fe.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PDP10/pdp10_fe.c b/PDP10/pdp10_fe.c index 3b16b174..5a6a30ef 100644 --- a/PDP10/pdp10_fe.c +++ b/PDP10/pdp10_fe.c @@ -191,8 +191,12 @@ t_stat fei_svc (UNIT *uptr) { int32 temp; -temp = sim_poll_kbd (); /* get possible char or error? */ sim_clock_coschedule (uptr, tmxr_poll); /* continue poll */ + +if (M[FE_CTYIN] & FE_CVALID) /* previous character still pending? */ + return SCPE_OK; /* wait until it gets digested */ + +temp = sim_poll_kbd (); /* get possible char or error? */ if (temp < SCPE_KFLAG) /* no char or error? */ return temp; if (temp & SCPE_BREAK) /* ignore break */