From 488fafc44203cbce2d641966c2f122025dcd043b Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 2 Sep 2025 17:16:05 +0200 Subject: Split the --stats and the --strict flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- crates/nasm/src/main.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'crates/nasm/src') diff --git a/crates/nasm/src/main.rs b/crates/nasm/src/main.rs index cc516b6..2aab743 100644 --- a/crates/nasm/src/main.rs +++ b/crates/nasm/src/main.rs @@ -32,7 +32,7 @@ fn print_help() { println!(" -D (=VALUE)\tDefine an 8-bit variable on the global scope (default: 1)"); println!(" -h, --help\t\tPrint this message."); println!(" -o, --out \tFile path where the output should be located after execution."); - println!(" -s, --stats\t\tPrint the statistics on how segments have been filled."); + println!(" -s, --stats\t\tPrint the statistics on the final layout of segments and memory."); println!(" --stdout\t\tPrint the output binary to the standard output."); println!(" -v, --version\t\tPrint the version of this program."); println!( @@ -383,15 +383,10 @@ fn main() { if args.info { save_memory_stats(&source, &mut memory, has_working_ram); } - - if !args.stats { - println!("== Statistics ==\n"); - } else { - println!(); + if args.stats { + println!("\n=> Amount of memory used (in bytes):\n"); + print_memory_summary(Box::new(io::stdout()), &memory, has_working_ram); } - println!("=> Amount of memory used (in bytes):\n"); - - print_memory_summary(Box::new(io::stdout()), &memory, has_working_ram); } } -- cgit v1.2.3