This differs from a plain old comment in the following ways:
1. It is optionally macro-expanded;
2. It has a dash prefix;
3. It can be used inside .nolist macros.
Suggested-by: <pushbx@ulukai.org>
Resolves: https://bugzilla.nasm.us/show_bug.cgi?id=3392915
Signed-off-by: H. Peter Anvin <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>
Update and improve the build from source documentation, including add
an auto-generated list of Perl build dependencies.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
There is no point in using "only" unless there is another
qualifier. The "only" is specifically to prevent older parsers from
unconditionally applying a section with qualifiers.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Try to better sort out the necessary dependencies for warning
generation.
Fix regex for cleaning up nasmdoc markup: nasmdoc markup does not
nest, although it may include \} sequences.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Require the second colon before the grouped parameter count; otherwise
the syntax is ambiguous since an expression can start with (.
Update/complete the documentation and the examples.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Add the %map() function which can apply arguments to a macro from a
list.
Allow the user to specify the desired radix for an evaluated
parameter. It doesn't make any direct difference, but can be nice for
debugging or turning into strings.
As part of this, split expand_one_smacro() into two parts: parameter
parsing and macro expansion. This is a very straightforward splitting
of two mostly unrelated pieces of functionality.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
The production "value := type value" was not correct; should have been
"type atom", which can be merged with the "atom" production to "[type]
atom".
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Make it possible to add a base prefix to %num().
Add the %hex() function, producing hexadecimal values that are
nevertheless valid NASM numeric constants.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
%expr() was a pre-release development name for this function, however,
the released name is %eval().
See BR 3392837.
Reported-by: Michael <mikar_gibbros@yahoo.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
It may be possible to generate the printed documentation from the
HTML, with a suitable combination of print-only CSS. Definitely not
there yet, though.
The dependency on the warning files breaks when we are building in a
directory *and* the files already exist from being shipped with the
distribution tarballs. The make VPATH simply isn't sophisticated
enough to deal with it, so let the C compiler handle it by #including
the generated file from a dummy C file.
Reported-by: Rudi Heitbaum <rudi@heitbaum.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Add Chapter 1 to the navbar for the table of contents, for ease of
sequentially reading the whole document.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Document CPU LATEVEX and the associated prefixes; add CPU EVEX and CPU
VEX flags to further control encodings.
Fix the error message for invalid encodings due to flags.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Bring doc/changes.src up to date with the current status of tree in
preparation for the 2.16 release.
Note that no 2.15.06 release ever was produced.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Add the option of having strings only conditionally quoted (&&) -- do
not quote an already quoted string again -- as opposed to always
quoting a string.
This makes a lot of the string functions way simpler to implement, and
removes the need to share ad hoc parsing code with directives.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Add the %abs() function, to produce the absolute value as an
always-positive decimal constant.
Change the order of the arguments for %num().
Refactor the handling of optional arguments, to reduce the amount of
redundant code. This is currently only used for builtin functions, but
might be extended in the future.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Implement the %cond() and %sel() functions that expand to a specific
one of the arguments. %cond(x,y,z) is basically a shorthand for
%sel(2-!(x),y,z) used when x is a boolean condition.
Fix a memory leak in %strcat and %strlen.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
In some of the preprocessor function examples, actually enforce
equivalence by using %xdefine in the function examples so the
expansion is at definition time.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>