diff --git a/VAX/vax860_stddev.c b/VAX/vax860_stddev.c index c656349e..d6a1c1da 100644 --- a/VAX/vax860_stddev.c +++ b/VAX/vax860_stddev.c @@ -193,6 +193,7 @@ RLDS_VCK+RLDS_DSE) /* errors bits */ int32 tti_csr = 0; /* control/status */ +uint32 tti_buftime; /* time input character arrived */ int32 tti_buf = 0; /* buffer */ int32 tti_int = 0; /* interrupt */ int32 tto_csr = 0; /* control/status */ @@ -590,13 +591,16 @@ switch (line) { case ID_CT: /* console terminal */ sim_clock_coschedule (uptr, tmxr_poll); /* continue poll */ - if ((tti_csr & CSR_DONE) == 0) { /* prev data taken? */ - if ((c = sim_poll_kbd ()) < SCPE_KFLAG) /* no char or error? */ - return c; - if (c & SCPE_BREAK) /* break? */ - tti_buf = 0; - else tti_buf = sim_tt_inpcvt (c, TT_GET_MODE (uptr->flags)); - } + if ((tti_csr & CSR_DONE) && /* input still pending and < 500ms? */ + ((sim_os_msec () - tti_buftime) < 500)) + return SCPE_OK; + if ((c = sim_poll_kbd ()) < SCPE_KFLAG) /* no char or error? */ + return c; + if (c & SCPE_BREAK) /* break? */ + tti_buf = 0; + else + tti_buf = sim_tt_inpcvt (c, TT_GET_MODE (uptr->flags)); + tti_buftime = sim_os_msec (); break; case ID_LC: /* logical console */