From 466dcce47cc1158d5d92a66119d4d89fe657e356 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 8 Oct 2026 21:56:43 +0200 Subject: runrom: regularize the output on report MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make the hexadecimal values more cohesive and avoid having a variable-sized line because of them. Signed-off-by: Miquel Sabaté Solà --- crates/runrom/src/main.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'crates') diff --git a/crates/runrom/src/main.rs b/crates/runrom/src/main.rs index 9671a0b..4d94384 100644 --- a/crates/runrom/src/main.rs +++ b/crates/runrom/src/main.rs @@ -328,10 +328,17 @@ fn run( title = true; } - println!( - "[${:X}] = ${:02X} [reads={}, writes={}]", - idx, cell.value, cell.reads, cell.writes - ); + if idx > 0xFF { + println!( + "[${:04X}] = ${:02X} [reads={}, writes={}]", + idx, cell.value, cell.reads, cell.writes + ); + } else { + println!( + " [${:02X}] = ${:02X} [reads={}, writes={}]", + idx, cell.value, cell.reads, cell.writes + ); + } } } } -- cgit v1.2.3