aboutsummaryrefslogtreecommitdiff
path: root/crates/nasm
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-09-02 17:16:05 +0200
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-09-02 17:16:05 +0200
commit488fafc44203cbce2d641966c2f122025dcd043b (patch)
tree3519c4fd9608204dd425f4716e83488149e18992 /crates/nasm
parent54a585e751e77c2406005b04ababbd93f23eba7e (diff)
downloadtools.nes-488fafc44203cbce2d641966c2f122025dcd043b.tar.gz
tools.nes-488fafc44203cbce2d641966c2f122025dcd043b.zip
Split the --stats and the --strict flags
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'crates/nasm')
-rw-r--r--crates/nasm/src/main.rs13
1 files changed, 4 insertions, 9 deletions
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 <NAME>(=VALUE)\tDefine an 8-bit variable on the global scope (default: 1)");
println!(" -h, --help\t\tPrint this message.");
println!(" -o, --out <FILE>\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);
}
}