Commit Graph

738 Commits

Author SHA1 Message Date
H. Peter Anvin
8d62e99e14 Add %note directive to add a note in the list file
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>
2024-09-19 13:21:30 +02:00
H. Peter Anvin
6ad3bab7fe doc: break the documentation into chapters
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>
2024-08-13 15:55:37 -07:00
H. Peter Anvin
a1e3140808 doc: fix the equivalent description for %cond()
%cond(x,y,z) == %sel(1+!(x),y,z), not %sel(2-!(x),y,z).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-06-01 17:30:27 -07:00
H. Peter Anvin
aa03a95edd doc: improve the build from source documentation
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>
2024-05-20 10:54:26 -07:00
H. Peter Anvin
2e0212bcd3 doc/rdsrc.pl: add \w{...} to reduce the verbosity of web links
Create a shorthand for a web link where the URL itself is also the text.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2024-05-20 10:31:57 -07:00
Cyrill Gorcunov
0421148e33 doc/nasmdoc.src: fix typo in web link
Reported-by: Danny Cohen <dannycoh@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2024-05-01 21:54:17 +03:00
H. Peter Anvin
68999937f3 doc/nasmdoc.css: @media only print -> @media print
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>
2024-04-25 15:42:25 -07:00
H. Peter Anvin
6165d6c014 Merge remote-tracking branch 'github/nasm-2.16.xx'
Resolved Conflicts:
	doc/changes.src
2024-04-25 15:37:36 -07:00
H. Peter Anvin
68d59933f7 doc/changes.src: begin release notes for 2.16.04.
Better to keep up with it now...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-04-25 15:36:25 -07:00
H. Peter Anvin
3334c3c2dc Merge remote-tracking branch 'github/nasm-2.16.xx' 2024-04-18 15:32:59 -07:00
H. Peter Anvin
0537b16fdc doc: fix tag label for cl-2.16.03
cl-2.16.03 was incorrectly marked as a dup of cl-2.16.02.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-04-18 15:30:31 -07:00
H. Peter Anvin
843976d343 Merge remote-tracking branch 'github/nasm-2.16.xx'
Resolved Conflicts:
	autoconf/m4/pa_add_langflags.m4
	autoconf/m4/pa_option_lto.m4
	autogen.sh
	configure.ac
	doc/changes.src
2024-04-18 15:25:48 -07:00
H. Peter Anvin
c4b954931e doc/changes.src: update release notes
Update release notes to match the current status.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-04-16 16:35:34 -07:00
H. Peter Anvin
a518f3bc72 changes.src: begin release notes for 2.16.03
Probably will have to release a 2.16.03 soon. Start the release notes.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-04-12 13:24:04 -07:00
H. Peter Anvin
99d3342033 doc: make it clearer than -O0 and -O1 are almost never useful
-Ox is the default, and the preferred mode for almost all users.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-04-12 11:08:37 -07:00
H. Peter Anvin
6f44296adc doc: get rid of some unnecessarily wordy option descriptions
Some options had unnecessarily wordy titles. Also change Make ->
\c{make}.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-04-12 11:06:03 -07:00
H. Peter Anvin
1ad669bf06 nasmdoc.css: simplify some media queries
Some media queries were needlessly complicated and misinterpreted by
some browsers.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-04-04 15:15:05 -07:00
H. Peter Anvin
b11cd3a426 warnings: more improvements to warnings generation
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>
2024-04-04 14:18:34 -07:00
H. Peter Anvin
33ef63669c doc: improve some formatting, mostly of the warning list
Fix some formatting markups, especially with regards to warnings.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-04-04 12:58:32 -07:00
H. Peter Anvin
e55c571af4 doc: release notes for 2.16.02
Release notes for 2.16.02 to prepare for imminent release.
2024-04-04 12:56:43 -07:00
H. Peter Anvin
9f83c383e4 preproc, %map(): require second colon, update documentation
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>
2023-10-16 13:42:16 -07:00
H. Peter Anvin
34eefd3803 preproc: add %map() function and radix specifiers
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>
2023-10-15 22:43:28 -07:00
H. Peter Anvin
bab37b3501 doc: %hex() is not a chapter!
%hex() is a subsection, not a chapter. Oops!

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 21:33:25 -07:00
H. Peter Anvin
94b053a59c doc: one instance of a __foo__ macro didn't get updated to __?foo?__
__USE_package__ should be __?USE_package?__.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 21:28:36 -07:00
H. Peter Anvin
432ea5b2b0 doc: editorial changes
Fix a few typos and poor grammar.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 21:25:48 -07:00
H. Peter Anvin
2a5c87362b doc: one more correction to the Dx syntax grammar
The commas in the lists are literal commas.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 21:15:25 -07:00
H. Peter Anvin
d7d51e39ce doc: correct a minor problem in the grammar for Dx statements
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>
2023-10-13 21:10:59 -07:00
H. Peter Anvin
dcac46d973 preproc: add options for a base prefix to %num(), add %hex()
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>
2023-10-13 17:50:55 -07:00
H. Peter Anvin
156b61b614 doc: correct %expr -> %eval
%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>
2023-10-13 17:14:11 -07:00
H. Peter Anvin
6198a2396c doc: slightly more wordsmithing
Tidy up the new text for the bin format a little more.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 17:09:25 -07:00
H. Peter Anvin
d31dca5860 doc: be more clear than .bin is simply a linker built into NASM
.bin really is nothing other than a linker built into NASM. Make that
very very clear to users.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-13 17:05:53 -07:00
H. Peter Anvin
ec4e4126e3 doc: add a few tags to the html output format
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.
2023-10-11 10:38:18 -07:00
H. Peter Anvin
a916e4127b Merge remote-tracking branch 'github/nasm-2.16.xx' 2023-02-19 21:29:46 -08:00
H. Peter Anvin
8ce37daeea doc/changes.src: update to reflect current state
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-02-19 21:28:49 -08:00
H. Peter Anvin
cb29058de0 Merge in the current state of the 2.16.xx branch 2023-02-19 16:31:42 -08:00
H. Peter Anvin
7e80d6b834 Make: handle warning files while building in a directory
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>
2023-01-17 13:05:55 -08:00
H. Peter Anvin
e847465bb5 Merge remote-tracking branch 'github/nasm-2.16.xx'
Resolved Conflicts:
	doc/changes.src

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-12-21 18:40:08 -08:00
H. Peter Anvin
8d5d663607 doc: html: add Chapter 1 to navbar in the TOC
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>
2022-12-21 18:35:17 -08:00
H. Peter Anvin
b67d42380c doc: fix HTML table of contents generation
Fix the HTML table of contents being completely broken.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-12-21 18:23:27 -08:00
H. Peter Anvin
feac856c54 version: this is now the 2.17 development branch
2.16 has been released, this is now officially the 2.17 development
branch.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-12-20 21:55:08 -08:00
H. Peter Anvin
9607c6685f doc/changes.src: document obj segment fix
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-12-07 10:55:20 -08:00
H. Peter Anvin
55dc058356 Document CPU LATEVEX, add CPU EVEX and CPU VEX flags
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>
2022-12-07 10:11:21 -08:00
H. Peter Anvin
d3afc5c1d7 doc: bring doc/changes.src up to date
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>
2022-11-23 14:35:04 -08:00
H. Peter Anvin
516fbba03e preproc: add conditional-string smacro parameters; simplify functions
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>
2022-11-21 10:54:19 -08:00
H. Peter Anvin
36cd305ade preproc: add %abs(), modify %num(), refactor
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>
2022-11-17 15:29:10 -08:00
H. Peter Anvin
e7dd0e8e3f doc: document the %num() function
Add documentation for the %num() preprocessor function.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-15 17:13:22 -08:00
H. Peter Anvin
664a79473d preproc: add %count() function
Add %count(), giving a count of the number of arguments.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-14 01:48:38 -08:00
H. Peter Anvin
02384ec6ac doc: add clarification to %sel()
Add clarification that %sel(), like %cond(), never expands
non-selected arguments.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-11-13 23:02:05 -08:00
H. Peter Anvin
d9b36e3c9c preproc: implement the %cond() and %sel() functions; fix memory leak
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>
2022-11-13 22:59:16 -08:00
H. Peter Anvin
8de66e9a50 doc: replace %define with %xdefine in some preproc function examples
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>
2022-11-13 21:11:11 -08:00