Older versions of NASM would not try to match unknown %if directives
with a corresponding %endif, resulting in some very odd consequences
when it comes to trying to handle support for multiple NASM versions.
Document the problem.
Reported-by: E. C. Masloch <pushbx@ulukai.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
The message-generating functions appear to get expanded when they
shouldn't, resulting in errors. Disable them for now and remove them
from the documentation.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Add the %find() and %findi() functions to look for a string in a
list. This is useful with picking apart the contents of the
__?DEFAULT?__ macro, for example.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Create a __?DEFAULT?__ magic macro with the settings of the DEFAULT
directive.
The DEFAULT directive is complex enough that this is best done with a
magic macro.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
The %exitmacro directive was never documented, apparently...
Reported-by: E. C. Masloch <pushbx@ulukai.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Change 3.0 to 3.00 in all version numbers, since NASM has
traditionally expanded all but the major version number to 2 digits.
Make the language related to __?NASM_HAS_IFDIRECTIVE?__ more
consistent.
Reported-by: E. C. Masloch <pushbx@ulukai.org>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
There are currently six variations of each conditionals, and there may
be more in the future (e.g. %while). Stop trying to enumerate them all
everywhere.
Add support for index copying in the document processor.
Have pptok.pl auto-generate index metadata for conditional
preprocessor directives.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
It seems to make sense to call this upcoming release NASM 3.0.
Suggested by: Yongjie Sheng <sheng.yongjie@intel.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Along with C and other languages, the current trend is to be able to
probe for features rather than relying on version numbers. This is
motivated in part by the intent of bumping the major version number to
3.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Add the %null(), %note(), %warning(), %error(), and %fatal()
functions. They behave like the corresponding directives, then expands
to nothing.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
It is good to have a way to test for the existence of macro functions,
and since they are really just a special case of single-line macros,
allow %ifdef to test for them instead of coming up with something
entirely new.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Add a function to test for the existence of a file, and a function
query the real operating system path, if available.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Implement preprocessor function equivalents of the %pathsearch and
%depend directives.
Simplify the incbin standard macro by using these functions.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Link from %if to %is(), not just the other way.
Clarify that %is() is valid everywhere, not just in an %if expression
(unlike defined() in C.)
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
The %unimacro directive is almost a footnote, but it is really
important to use the correct directive. Put it on equal footing with
%unmacro.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Make the source code for the documentation a little easier to deal
with by breaking it into individual chapter files. Add support to
rdsrc.pl for auto-generating dependencies.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>