From 5dcc00ea101aee85c165d2014db721194391166a Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Wed, 20 Oct 2021 10:22:35 +0200 Subject: [PATCH] H316: Fix debugging host interface messages. --- H316/h316_hi.c | 7 ++++--- H316/h316_imp.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/H316/h316_hi.c b/H316/h316_hi.c index a368d06d..fc8c3117 100644 --- a/H316/h316_hi.c +++ b/H316/h316_hi.c @@ -172,6 +172,7 @@ DEBTAB hi_debug[] = { {"WARN", IMP_DBG_WARN}, // print warnings that would otherwise be suppressed {"UDP", IMP_DBG_UDP}, // print all UDP messages sent and received {"IO", IMP_DBG_IOT}, // print all program I/O instructions + {"MSG", HI_DBG_MSG}, // decode and print all messages {0} }; @@ -292,12 +293,12 @@ void hi_debug_hio (uint16 line, uint32 dmc, const char *ptext) void hi_debug_msg (uint16 line, uint16 next, uint16 count, const char *ptext) { uint16 i; char buf[CBUFSIZE]; int len = 0; - if (!ISHDBG(line, MI_DBG_MSG)) return; - sim_debug(MI_DBG_MSG, PDEVICE(line), "message %s (length=%d)\n", ptext, count); + if (!ISHDBG(line, HI_DBG_MSG)) return; + sim_debug(HI_DBG_MSG, PDEVICE(line), "message %s (length=%d)\n", ptext, count); for (i = 1, len = 0; i <= count; ++i) { len += sprintf(buf+len, "%06o ", M[next+i-1]); if (((i & 7) == 0) || (i == count)) { - sim_debug(MI_DBG_MSG, PDEVICE(line), "- %s\n", buf); len = 0; + sim_debug(HI_DBG_MSG, PDEVICE(line), "- %s\n", buf); len = 0; } } } diff --git a/H316/h316_imp.h b/H316/h316_imp.h index e73fbb3d..e15b3f1f 100644 --- a/H316/h316_imp.h +++ b/H316/h316_imp.h @@ -128,6 +128,7 @@ #define IMP_DBG_IOT 0x0002 // all: trace all program I/O instructions #define IMP_DBG_UDP 0x0004 // all: trace UDP packets #define MI_DBG_MSG 0x8000 // modem: decode and print all messages +#define HI_DBG_MSG 0x8000 // host interface: decode and print all messages #define WDT_DBG_LIGHTS 0x8000 // wdt: show status light changes // Synonyms for DIB and UNIT fields ...