[Simh] PDP-11 opcode RESET disables interrupt char ^E

Jörg Hoppe j_hoppe at t-online.de
Wed Apr 11 05:06:10 EDT 2012


Problem:
-------
This program can not be stopped with the interrupt char  ^E.
001000 005000   clr     r0
001002 005200   inc     r0
001004 006100   rol     r0
001006 000005   reset
001010 000775   br      001004
(It shows a moving light on a blinkenlight console)

This occured under Win7 and Linux (Ubuntu 10)

Explanation:
-------------------
- The keyboard interrupt char is polled and processed by pdp11_stddev.c, 
tti_svc(),
   which is called by the event queuing subsystem of SimH.
- RESET resets all devices, and resets also the next polling time for
   console input device "tti" into the future.
- So if RESET occurs in a tight loop, tti_svc() is never processed.

Possible solution
-----------------------
RESET activates the UNIBUS signal INIT for 20 milliseconds.
If SimH simulates RESET as lasting 20 milliseconds, the bug disappears.

My code patch is located in pdp11_cpu.c at the end of the RESET opcode case.
Search for "reset_all (2);" and go behind the "dsenable = calc_ds (cm);"
Add
         // RESET lasts 20ms
         sim_os_ms_sleep(20) ;
          // 20000 cycles later now, queued events will be processed 
immediately
         sim_interval -= 20000 ;


Joerg









More information about the Simh mailing list