I am writing a macro in NASM that needs to show an error message to the user at the Assemble-time if a specific value is not defined. The prototype must be:

IF X IS DEFINED THEN
  ... ASSEMBLE
ELSE
  ... DO NOT ASSEMBLE
  ... SHOW THIS MESSAGE IN THE CONSOLE INSTEAD
END


I don't know if it is possible to output a message at assembly-time in NASM or not so if anybody knows, I'd be thankful.
Posted on 2007-06-12 02:44:59 by XCHG
%ifdef X
;... Assemble
%else
%error Show This Message In The Console Instead
%endif
Posted on 2007-06-12 15:12:13 by Synfire
Thank you Bryant! I could code my PROTO macro with this. I appreciate your help although I can't believe I didn't see the description for %ERROR in NASM's documentations.
Posted on 2007-06-13 02:58:58 by XCHG