From 2b1e04c3ac7a631092624481cb7835978b857fab Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Wed, 6 Feb 2019 22:54:18 -0500 Subject: [PATCH] debug shell - allow registers as addresses. --- src/debug_shell.re2c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/debug_shell.re2c b/src/debug_shell.re2c index 472607a..c2c1f32 100644 --- a/src/debug_shell.re2c +++ b/src/debug_shell.re2c @@ -702,6 +702,42 @@ static int parse_command(const char *cp) { "reset" end { do_reset(); return 0; } ("help" | "?") end { do_help(); return 0; } + "pc" { + addr = engine.kpc; + has_addr = 1; + has_bank = 1; + goto indir; + } + "a" { + addr = engine.acc; + has_addr = 1; + has_bank = 0; + goto indir; + } + "x" { + addr = engine.xreg; + has_addr = 1; + has_bank = 0; + goto indir; + } + "y" { + addr = engine.yreg; + has_addr = 1; + has_bank = 0; + goto indir; + } + "s" { + addr = engine.stack; + has_addr = 1; + has_bank = 1; + goto indir; + } + "d" { + addr = engine.dbank; + has_addr = 1; + has_bank = 1; + goto indir; + } x{6} { addr = to_hex(cp, cp + 6);