From b7066fea3a648803e2a8837cb0df69d49a57a884 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 22 Jan 2013 16:01:44 -0800 Subject: [PATCH] Changed examine register range to summarize redundant (duplicate) output. --- scp.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/scp.c b/scp.c index db8f2471..1ca5ac74 100644 --- a/scp.c +++ b/scp.c @@ -2003,6 +2003,12 @@ if (cptr && (*cptr != 0)) return SCPE_2MARG; #ifdef SIM_ASYNCH_IO fprintf (st, "Asynchronous I/O is %sabled, %s\n", (sim_asynch_enabled) ? "en" : "dis", AIO_QUEUE_MODE); +#if defined(SIM_ASYNCH_MUX) +fprintf (st, "Asynchronous Multiplexer support is available\n"); +#endif +#if defined(SIM_ASYNCH_CLOCKS) +fprintf (st, "Asynchronous Clock is %sabled\n", (sim_asynch_timer) ? "en" : "dis"); +#endif #else fprintf (st, "Asynchronous I/O is not available in this simulator\n"); #endif @@ -4214,8 +4220,8 @@ t_stat exdep_reg_loop (FILE *ofile, SCHTAB *schptr, int32 flag, char *cptr, REG *lowr, REG *highr, uint32 lows, uint32 highs) { t_stat reason; -uint32 idx; -t_value val; +uint32 idx, val_start=lows; +t_value val, last_val; REG *rptr; if ((lowr == NULL) || (highr == NULL)) @@ -4233,6 +4239,19 @@ for (rptr = lowr; rptr <= highr; rptr++) { if (schptr && !test_search (val, schptr)) continue; if (flag != EX_D) { + 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); + if (reason != SCPE_OK) + return reason; + } + else + fprintf (ofile, "%s[%d]-%s[%d]: same as above\n", rptr->name, val_start+1, rptr->name, idx-1); + } + last_val = val; + val_start = idx; reason = ex_reg (ofile, val, flag, rptr, idx); if (reason != SCPE_OK) return reason; @@ -4245,6 +4264,15 @@ for (rptr = lowr; rptr <= highr; rptr++) { return reason; } } + if ((flag != EX_D) && (val_start != highs)) { + if (highs == val_start+1) { + reason = ex_reg (ofile, val, flag, rptr, highs); + if (reason != SCPE_OK) + return reason; + } + else + fprintf (ofile, "%s[%d]-%s[%d]: same as above\n", rptr->name, val_start+1, rptr->name, highs); + } } return SCPE_OK; }