VAX: Allow SET CPU IDLE command to not specify a stability value.
Report invalid stability values and explain why they're invalid. Fixes #281
This commit is contained in:
parent
9a7c46f59e
commit
c8cd853102
4 changed files with 8 additions and 12 deletions
|
@ -3719,8 +3719,8 @@ fprintf (st, "detection is operating system specific. If idle detection is enab
|
|||
fprintf (st, "an incorrect operating system setting, simulator performance or correct\n");
|
||||
fprintf (st, "functionality could be impacted. The default operating system setting is\n");
|
||||
fprintf (st, "VMS. The value 'n', if present in the \"SET CPU IDLE={OS}:n\" command,\n");
|
||||
fprintf (st, "indicated the number of seconds which the simulator must run before idling\n");
|
||||
fprintf (st, "(and clock calibration) starts.\n\n");
|
||||
fprintf (st, "indicats the number of seconds which the simulator must run before idling\n");
|
||||
fprintf (st, "starts.\n\n");
|
||||
fprintf (st, "The CPU can maintain a history of the most recently executed instructions.\n");
|
||||
fprintf (st, "This is controlled by the SET CPU HISTORY and SHOW CPU HISTORY commands:\n\n");
|
||||
fprintf (st, " sim> SET CPU HISTORY clear history buffer\n");
|
||||
|
|
Binary file not shown.
BIN
doc/vax_doc.doc
BIN
doc/vax_doc.doc
Binary file not shown.
16
sim_timer.c
16
sim_timer.c
|
@ -1004,18 +1004,14 @@ t_stat sim_set_idle (UNIT *uptr, int32 val, char *cptr, void *desc)
|
|||
t_stat r;
|
||||
uint32 v;
|
||||
|
||||
if (sim_idle_rate_ms == 0) {
|
||||
sim_printf ("Idling is not available, Minimum OS sleep time is %dms\n", sim_os_sleep_min_ms);
|
||||
return SCPE_NOFNC;
|
||||
}
|
||||
if ((val != 0) && (sim_idle_rate_ms > (uint32) val)) {
|
||||
sim_printf ("Idling is not available, Minimum OS sleep time is %dms, Requied minimum OS sleep is %dms\n", sim_os_sleep_min_ms, val);
|
||||
return SCPE_NOFNC;
|
||||
}
|
||||
if (cptr) {
|
||||
if (sim_idle_rate_ms == 0)
|
||||
return sim_messagef (SCPE_NOFNC, "Idling is not available, Minimum OS sleep time is %dms\n", sim_os_sleep_min_ms);
|
||||
if ((val != 0) && (sim_idle_rate_ms > (uint32) val))
|
||||
return sim_messagef (SCPE_NOFNC, "Idling is not available, Minimum OS sleep time is %dms, Requied minimum OS sleep is %dms\n", sim_os_sleep_min_ms, val);
|
||||
if (cptr && *cptr) {
|
||||
v = (uint32) get_uint (cptr, 10, SIM_IDLE_STMAX, &r);
|
||||
if ((r != SCPE_OK) || (v < SIM_IDLE_STMIN))
|
||||
return SCPE_ARG;
|
||||
return sim_messagef (SCPE_ARG, "Invalid Stability value: %s. Valid values range from %d to %d.\n", cptr, SIM_IDLE_STMIN, SIM_IDLE_STMAX);
|
||||
sim_idle_stable = v;
|
||||
}
|
||||
sim_idle_enab = TRUE;
|
||||
|
|
Loading…
Add table
Reference in a new issue