mirror of
https://github.com/simh/simh.git
synced 2026-01-13 23:35:57 +00:00
SCP: Assure consistent PC state while preparing RUN command execution
Some simulator reset routines may reference the RUN target PC value while others may change the PC, so we set the PC value both before and after any reset is performed. As reported in #1020
This commit is contained in:
parent
6323acd5ea
commit
e51d918adb
3
scp.c
3
scp.c
@ -8642,6 +8642,7 @@ if ((flag == RU_RUN) || (flag == RU_GO)) { /* run or go */
|
||||
new_pc = TRUE;
|
||||
}
|
||||
}
|
||||
put_rval_pcchk (sim_PC, 0, new_pcv, new_pc); /* Save in PC in case reset references PC */
|
||||
if ((flag == RU_RUN) && /* run? */
|
||||
((r = sim_run_boot_prep (flag)) != SCPE_OK)) { /* reset sim */
|
||||
put_rval_pcchk (sim_PC, 0, orig_pcv, FALSE); /* restore original PC */
|
||||
@ -8674,7 +8675,7 @@ if ((flag == RU_RUN) || (flag == RU_GO)) { /* run or go */
|
||||
}
|
||||
sim_switches = saved_switches;
|
||||
}
|
||||
put_rval_pcchk (sim_PC, 0, new_pcv, new_pc); /* Save in PC */
|
||||
put_rval_pcchk (sim_PC, 0, new_pcv, new_pc); /* Save in PC again in case reset changed it */
|
||||
}
|
||||
|
||||
else if ((flag == RU_STEP) ||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user