PDP11: Add SP to instruction history
This commit is contained in:
parent
d8eeb1ce00
commit
cdfb7c0878
1 changed files with 5 additions and 2 deletions
|
@ -258,6 +258,8 @@ typedef struct {
|
|||
uint16 psw;
|
||||
uint16 src;
|
||||
uint16 dst;
|
||||
uint16 sp;
|
||||
uint16 pad;
|
||||
uint16 inst[HIST_ILNT];
|
||||
} InstHistory;
|
||||
|
||||
|
@ -963,6 +965,7 @@ while (reason == 0) {
|
|||
};
|
||||
hst_ent = &hst[hst_p];
|
||||
hst_ent->pc = PC | HIST_VLD;
|
||||
hst_ent->sp = SP;
|
||||
hst_ent->psw = get_PSW ();
|
||||
hst_ent->src = 0;
|
||||
hst_ent->dst = 0;
|
||||
|
@ -3551,12 +3554,12 @@ else lnt = hst_lnt;
|
|||
di = hst_p - lnt; /* work forward */
|
||||
if (di < 0)
|
||||
di = di + hst_lnt;
|
||||
fprintf (st, "PC PSW src dst IR\n\n");
|
||||
fprintf (st, "PC SP PSW src dst IR\n\n");
|
||||
for (k = 0; k < lnt; k++) { /* print specified */
|
||||
h = &hst[(di++) % hst_lnt]; /* entry pointer */
|
||||
if (h->pc & HIST_VLD) { /* instruction? */
|
||||
ir = h->inst[0];
|
||||
fprintf (st, "%06o %06o|", h->pc & ~HIST_VLD, h->psw);
|
||||
fprintf (st, "%06o %06o %06o|", h->pc & ~HIST_VLD, h->psw);
|
||||
if (((ir & 0070000) != 0) || /* dops, eis, fpp */
|
||||
((ir & 0177000) == 0004000)) /* jsr */
|
||||
fprintf (st, "%06o %06o ", h->src, h->dst);
|
||||
|
|
Loading…
Add table
Reference in a new issue