PDP11: Added support for PC values to be displayed in debug output.

This required a simulator specific implementation since the PDP11 PC register isn't stored in a normal memory location.  It is loaded from a temporary location upon simulator instruction execution startup (and saved to that location when instuction execution stops).  In order to reference the PC value while executing instructions (for debug output), this extended access model is required.
This commit is contained in:
Mark Pizzolato 2013-11-17 08:55:29 -08:00
parent 864f0e0d37
commit 3519c6c74b

View file

@ -630,12 +630,19 @@ DEVICE cpu_dev = {
NULL, &cpu_set_size, NULL NULL, &cpu_set_size, NULL
}; };
t_value pdp11_pc_value (void)
{
return (t_value)PC;
}
t_stat sim_instr (void) t_stat sim_instr (void)
{ {
int abortval, i; int abortval, i;
volatile int32 trapea; /* used by setjmp */ volatile int32 trapea; /* used by setjmp */
t_stat reason; t_stat reason;
sim_vm_pc_value = &pdp11_pc_value;
/* Restore register state /* Restore register state
1. PSW components 1. PSW components