From 7aea2e56f2373ac86c067d307ef8bd9dc560f3eb Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Tue, 19 Mar 2019 00:38:33 -0400 Subject: [PATCH] - tweak ^D newlins - %d was incorrect - template pointers were 16-bit. --- src/debug_shell.re2c | 7 +++---- src/debug_template.re2c | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/debug_shell.re2c b/src/debug_shell.re2c index 5003e08..22b9372 100644 --- a/src/debug_shell.re2c +++ b/src/debug_shell.re2c @@ -1244,7 +1244,7 @@ static int parse_command(const char *cp) { goto indir; } "%d" { - addr = engine.dbank; + addr = engine.direct; has_addr = 1; has_bank = 1; goto indir; @@ -1471,10 +1471,9 @@ int debug_shell(int code) { for(;;) { cp = x_readline("> "); if (!cp) { - if (++control_d_count < 2) { - fputs("\n", stdout); + fputs("\n", stdout); + if (++control_d_count < 2) continue; - } return 0; } control_d_count = 0; diff --git a/src/debug_template.re2c b/src/debug_template.re2c index 1a6b563..430a35d 100644 --- a/src/debug_template.re2c +++ b/src/debug_template.re2c @@ -338,7 +338,7 @@ word32 debug_apply_template(word32 address, const char *name) { case 5: /* cstring */ case 6: /* pstring */ case 7: /* gs/os string */ - value = get_memory16_c(address, 0); + value = get_memory24_c(address, 0); address += 4; printf("%08x ", value); break;