[Simh] Simulating power fail

Mark Pizzolato Mark at infocomm.com
Fri Sep 7 13:24:59 EDT 2018


On Friday, September 7, 2018 at 10:12 AM, Paul Koning wrote:
> > On Sep 7, 2018, at 12:37 PM, Mark Pizzolato <Mark at infocomm.com> wrote:
> >
> > On Friday, September 7, 2018 at 1:18 AM, Lars Brinkhoff wrote:
> >> Timothe Litt wrote:
> >>> Adding an API in the CPU of the form assert_powerfail( vector) - where
> >>> the default is the usual 24/26, but a ROM can specify an alternate
> >>> (usually its base address + 24/26). This is common to all initiators.
> >>
> >> This touches on something else I have been thinking about.
> >>
> >> Would it be appropriate to have a SIGTERM (and/or similar signals) trigger a
> >> power fail in the PDP-11 and other simulators with corresponding
> >> mechanisms?  SIGINT goes into the SCP console, and of course SIGKILL
> instantly
> >> switches off the simulated machine.
> >> ...
> >
> > Alternatively, I've got a simulator that's been running via a script in a
> > background process for 10+ years.  The script it is running under receives
> > one of these signals and that immediately drops out of sim_instr() and the
> > script is configured to SAVE the simulator state to a file.
> 
> That's a fairly simple scripting exercise wrapped around SIMH.  You can catch
> the signal, send control/E to get the sim> prompt, then suitable examine and
> deposit commands to simulate a trap to 24.

SIGTERM and SIGINT already are caught in simh and when delivered they
cause exit from simulator instruction execution and return to sim> prompt.
No need for an extra wrapper or for sending control/E.

- Mark



More information about the Simh mailing list