PDP8: Add new breakpoint command based on instruction value (Opcode) (from Dave Gesswein) as discussed in issue #75
This commit is contained in:
parent
1a7f8d4df0
commit
7ce7317f7c
3 changed files with 14 additions and 5 deletions
|
@ -353,12 +353,18 @@ while (reason == 0) { /* loop until halted */
|
|||
}
|
||||
|
||||
MA = IF | PC; /* form PC */
|
||||
if (sim_brk_summ && sim_brk_test (MA, SWMASK ('E'))) { /* breakpoint? */
|
||||
if (sim_brk_summ &&
|
||||
sim_brk_test (MA, (1u << SIM_BKPT_V_SPC) | SWMASK ('E'))) { /* breakpoint? */
|
||||
reason = STOP_IBKPT; /* stop simulation */
|
||||
break;
|
||||
}
|
||||
|
||||
IR = M[MA]; /* fetch instruction */
|
||||
if (sim_brk_summ &&
|
||||
sim_brk_test (IR, (2u << SIM_BKPT_V_SPC) | SWMASK ('I'))) { /* breakpoint? */
|
||||
reason = STOP_OPBKPT; /* stop simulation */
|
||||
break;
|
||||
}
|
||||
PC = (PC + 1) & 07777; /* increment PC */
|
||||
int_req = int_req | INT_NO_ION_PENDING; /* clear ION delay */
|
||||
sim_interval = sim_interval - 1;
|
||||
|
@ -1364,7 +1370,8 @@ pcq_r = find_reg ("PCQ", NULL, dptr);
|
|||
if (pcq_r)
|
||||
pcq_r->qptr = 0;
|
||||
else return SCPE_IERR;
|
||||
sim_brk_types = sim_brk_dflt = SWMASK ('E');
|
||||
sim_brk_types = SWMASK ('E') | SWMASK('I');
|
||||
sim_brk_dflt = SWMASK ('E');
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -59,9 +59,10 @@
|
|||
#define STOP_RSRV 1 /* must be 1 */
|
||||
#define STOP_HALT 2 /* HALT */
|
||||
#define STOP_IBKPT 3 /* breakpoint */
|
||||
#define STOP_NOTSTD 4 /* non-std devno */
|
||||
#define STOP_DTOFF 5 /* DECtape off reel */
|
||||
#define STOP_LOOP 6 /* infinite loop */
|
||||
#define STOP_OPBKPT 4 /* Opcode/Instruction breakpoint */
|
||||
#define STOP_NOTSTD 5 /* non-std devno */
|
||||
#define STOP_DTOFF 6 /* DECtape off reel */
|
||||
#define STOP_LOOP 7 /* infinite loop */
|
||||
|
||||
/* Memory */
|
||||
|
||||
|
|
|
@ -119,6 +119,7 @@ const char *sim_stop_messages[] = {
|
|||
"Unimplemented instruction",
|
||||
"HALT instruction",
|
||||
"Breakpoint",
|
||||
"Opcode Breakpoint",
|
||||
"Non-standard device number",
|
||||
"DECtape off reel",
|
||||
"Infinite loop"
|
||||
|
|
Loading…
Add table
Reference in a new issue