From 42eea452eabf2c603e5f50731ba89f08e3dd81bd Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 3 Feb 2026 10:51:37 +0100 Subject: Add __NASM__ protection on the --prelude output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The __fallthrough__ macro can only be done when using ca65, not nasm, as that's a protected identifier. Hence, wrap the __fallthrough__ macro definition via an .ifndef __NASM__. Signed-off-by: Miquel Sabaté Solà --- crates/nasm/src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'crates') diff --git a/crates/nasm/src/main.rs b/crates/nasm/src/main.rs index 923f89e..e6c0042 100644 --- a/crates/nasm/src/main.rs +++ b/crates/nasm/src/main.rs @@ -51,9 +51,11 @@ fn print_prelude() { println!( r#";; The __fallthrough__ special statement allows developers to explicitly tell ;; the assembler that a "fall through" situation does not happen by mistake. -.macro __fallthrough__ arg - ;; NOTE: nothing to do :) -.endmacro"# +.ifndef __NASM__ + .macro __fallthrough__ arg + ;; NOTE: nothing to do :) + .endmacro +.endif"# ); std::process::exit(0); -- cgit v1.2.3