diff --git a/doc/simh.doc b/doc/simh.doc index 6fda17d0..cfc7dbb1 100644 Binary files a/doc/simh.doc and b/doc/simh.doc differ diff --git a/scp.c b/scp.c index 2b23cebe..a5384b0c 100644 --- a/scp.c +++ b/scp.c @@ -13607,7 +13607,7 @@ static const char *debtab_nomatch = "DEBTAB_NOMATCH"; const char *some_match = NULL; int32 offset = 0; -if (dptr->debflags == 0) +if (dptr->debflags == NULL) return debtab_none; dbits &= (dptr->dctrl | (uptr ? uptr->dctrl : 0));/* Look for just the bits that matched */ @@ -13676,6 +13676,8 @@ uint32 value, beforevalue, mask; for (fields=offset=0; bitdefs[fields].name; ++fields) { if (bitdefs[fields].offset == 0xffffffff) /* fixup uninitialized offsets */ bitdefs[fields].offset = offset; + else + offset = bitdefs[fields].offset; offset += bitdefs[fields].width; } for (i = fields-1; i >= 0; i--) { /* print xlation, transition */ @@ -13731,6 +13733,7 @@ if (sim_deb && dptr && (dptr->dctrl & dbits)) { sim_oline = saved_oline; /* restore original socket */ } } + void sim_debug_bits(uint32 dbits, DEVICE* dptr, BITFIELD* bitdefs, uint32 before, uint32 after, int terminate) { diff --git a/sim_defs.h b/sim_defs.h index eae5c432..4b5ceb15 100644 --- a/sim_defs.h +++ b/sim_defs.h @@ -986,6 +986,7 @@ struct MEMFILE { /* Hidden Blob of Data - Only used for SAVE/RESTORE */ #define SAVEDATA(nm,loc) \ _REGDATANF(#nm,&(loc),0,8,0,1,NULL,NULL,0,sizeof(loc),sizeof(loc),SAVEDATA),(REG_HRO) +#define STARTBIT {"", 0x00000000, 0, NULL, NULL} /* Start at beginning bit */ #define BIT(nm) {#nm, 0xffffffff, 1, NULL, NULL} /* Single Bit definition */ #define BITNC {"", 0xffffffff, 1, NULL, NULL} /* Don't care Bit definition */ #define BITF(nm,sz) {#nm, 0xffffffff, sz, NULL, NULL} /* Bit Field definition */ @@ -1073,6 +1074,7 @@ struct MEMFILE { /* Hidden Blob of Data - Only used for SAVE/RESTORE */ #define SAVEDATA(nm,loc) \ _REGDATANF("nm",&(loc),0,8,0,1,NULL,NULL,0,sizeof(loc),sizeof(loc)),SAVEDATA),(REG_HRO) +#define STARTBIT {"", 0x00000000, 0, NULL, NULL} /* Start at beginning bit */ #define BIT(nm) {"nm", 0xffffffff, 1, NULL, NULL} /* Single Bit definition */ #define BITNC {"", 0xffffffff, 1, NULL, NULL} /* Don't care Bit definition */ #define BITF(nm,sz) {"nm", 0xffffffff, sz, NULL, NULL} /* Bit Field definition */