VAX8600: Changed console input polling

Polling is now done at least every 500ms even if the prior input
character hasn't been processed yet.   This allows ^E to provide a way
to exit a simulator which otherwise isn't reading from the console port.
This commit is contained in:
Mark Pizzolato 2016-11-16 20:35:35 -08:00
parent b1950e1fe2
commit 32bf2629b1

View file

@ -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 */