1
0
mirror of https://github.com/open-simh/simh.git synced 2026-05-19 20:46:23 +00:00

SCP: Fix output produced when EXAMINE an array register

This problem was a latent bug introduced when summarized array register
output was added back in 2013 or 2018.

This fixes the problem reported in https://github.com/open-simh/simh/issues/499
This commit is contained in:
Mark Pizzolato
2025-09-25 09:40:19 -10:00
committed by rms47
parent 7741eb2bb0
commit 45f1ce7aea

16
scp.c
View File

@@ -9733,18 +9733,10 @@ for (rptr = lowr; rptr <= highr; rptr++) {
if ((idx > lows) && (val == last_val))
continue;
if (idx > val_start+1) {
if (idx-1 == val_start+1) {
reason = ex_reg (ofile, val, flag, rptr, idx-1);
sim_switches = saved_switches;
if (reason != SCPE_OK)
return reason;
}
else {
if (val_start+1 != idx-1)
fprintf (ofile, "%s[%d]-%s[%d]: same as above\n", rptr->name, val_start+1, rptr->name, idx-1);
else
fprintf (ofile, "%s[%d]: same as above\n", rptr->name, val_start+1);
}
if (val_start+1 != idx-1)
fprintf (ofile, "%s[%d]-%s[%d]: same as above\n", rptr->name, val_start+1, rptr->name, idx-1);
else
fprintf (ofile, "%s[%d]: same as above\n", rptr->name, val_start+1);
}
sim_last_val = last_val = val;
val_start = idx;