VAX: Change HALT behavior to dispatch non polling events prior to returning to SCP.

This allows pending I/O (console, or otherwise) to complete before dropping
back to the sim> prompt.  This better simulates the model where scp is analogous
to the console processor on the older VAX simulators.  This better addresses the
incomplete I/O problems discussed in #208
This commit is contained in:
Mark Pizzolato 2015-12-10 05:40:13 -08:00
parent ed5353b4f4
commit 2549f34560

View file

@ -2582,10 +2582,12 @@ for ( ;; ) {
else if (cpu_unit.flags & UNIT_CONH) /* halt to console? */
cc = con_halt (CON_HLTINS, cc); /* enter firmware */
else {
/* allow potentially pending console output to */
/* be displayed before dropping back to scp */
if (sim_interval <= SERIAL_OUT_WAIT) {
sim_interval -= SERIAL_OUT_WAIT;
/* allow potentially pending I/O (console output,
or other devices) to complete before dropping
back to scp */
while ((sim_clock_queue != QUEUE_LIST_END) &&
((sim_clock_queue->flags & UNIT_IDLE) == 0)) {
sim_interval = 0;
temp = sim_process_event ();
if (temp)
ABORT (temp);