From df803d2ccc6a3e1e112cc88feb6c8b84743073b6 Mon Sep 17 00:00:00 2001 From: bd Date: Tue, 11 Mar 2025 17:33:27 -0400 Subject: Call memory wrapping functions properly --- src/cli/cli.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cli/cli.cc') diff --git a/src/cli/cli.cc b/src/cli/cli.cc index 8dc7e2e..41ac57c 100644 --- a/src/cli/cli.cc +++ b/src/cli/cli.cc @@ -100,6 +100,7 @@ void Cli::help() void Cli::load(Accessor accessor, int address) { + address = wrap_address(address); const auto default_flags = std::cout.flags(); const auto default_fill = std::cout.fill(); @@ -107,7 +108,7 @@ void Cli::load(Accessor accessor, int address) Response r = this->cache->read_word(accessor, address, data); std::cout << r << " to " << accessor << " reading " << address << std::endl; if (r == OK) - std::cout << " Got:" << std::hex << data << std::endl; + std::cout << " Got: " << std::hex << data << std::endl; std::cout.flags(default_flags); std::cout.fill(default_fill); @@ -115,6 +116,7 @@ void Cli::load(Accessor accessor, int address) void Cli::store(Accessor accessor, int data, int address) { + address = wrap_address(address); Response r = this->cache->write_word(accessor, data, address); std::cout << r << " to " << accessor << " storing " << data << " in " << address << std::endl; -- cgit v1.2.3