0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00
Commit Graph

813 Commits

Author SHA1 Message Date
H. Peter Anvin
fe7c3c7171 This is the maintenance branch destined to become NASM 3.00.01 2025-10-03 12:58:02 -07:00
H. Peter Anvin
568fbff1cd changes.src: add a few more release notes
A few more notes about changes.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-03 12:01:05 -07:00
Fabian Giesen
912849c48c Document Mach-O build_version directive
Signed-off-by: Fabian Giesen <fabian.giesen@epicgames.com>

Resolved Conflicts:
	doc/outfmt.src

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-03 10:48:19 -07:00
H. Peter Anvin
95f866d47c changes.src: document FLAT obj changes.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-03 10:29:08 -07:00
H. Peter Anvin
a563e84a69 Merge remote-tracking branch 'jperrett256/jdp-doc-edits'
Resolved Conflicts:
	doc/macropkg.src

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2025-10-03 10:19:32 -07:00
H. Peter Anvin
f2da39910a doc/rdsrc.pl: fix output file comment
Not at all important, but might as well be consistent...

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-02 17:37:39 -07:00
H. Peter Anvin
467828c431 Even more path hacks for the rpm build
- append /html if htmldir = docdir

- Run autogen.sh with --cleanenv

- Actually use PDFZ and not just Z in doc/Makefile.in.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-02 17:31:58 -07:00
H. Peter Anvin
a179a1a826 install: add option for installing .pdf.xz; fix RPMs
- Add an option to use "make install" to install .pdf.xz

- Fix RPM spec file to put the documentation in doc/nasm instead of
  doc/nasm-doc.

- RPM doesn't like unversioned Obsoletes; set a valid cutoff.

- Make nasm-doc depend on nasm.

- Add zlib-devel as a build dependency.

- Add EXTRA_CFLAGS and EXTRA_LDFLAGS for some automated platforms.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-02 17:11:52 -07:00
H. Peter Anvin
7415a1e5f8 Build: update various build installation directories
Modernize and improve the handling of build directories.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-02 16:08:04 -07:00
H. Peter Anvin
4acc3dbccc Fix more license headers 2025-10-01 12:05:34 -07:00
H. Peter Anvin
23ce05f906 treewide: replace verbose copyright headers with SPDX tags
SPDX is an international standard for documenting software license
requirements. Remove the existing headers and replace with a brief
SPDX preamble.

See: https://spdx.dev/use/specifications/

The script used to convert the files is added to "tools", and the
file header templates in headers/ are updated.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-01 11:45:31 -07:00
H. Peter Anvin
1185c1f118 Document the [LIST] directive and add -LF option to suppress it
- Document the [LIST] directive
- Add an option -LF to ignore the [LIST] directive
- Fix [LIST -] suppressing output on a following pass
- Minor other documentation fixes

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 21:48:43 -07:00
H. Peter Anvin
df4bb50e23 changes.src: add %use vtern to the release notes
One more thing for the release notes...

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 20:51:45 -07:00
H. Peter Anvin
f7e91f7868 doc: document %use vtern, minor tidying of the syntax chapter
Document the "vtern" macro package, and do some quite minor tidying of
the syntax chapter.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 20:47:18 -07:00
H. Peter Anvin
ca0ceeb546 doc: switch from Adobe Source to Google Roboto
The NASM webpage is already using Roboto, and looks more legible in
the end.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 18:52:01 -07:00
H. Peter Anvin
36f4c324d0 doc: add more space after the section numbers in HTML
Use an &ensp; instead of a regular space, and add a period.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 17:36:04 -07:00
H. Peter Anvin
22cef23b34 macros: add st() macro to the masm macro package
A very easy way to improve portability.  Guarded with %ifndef just in
case...

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 17:31:42 -07:00
H. Peter Anvin
b80bec7435 doc: "MS-DOS" isn't a literal keyword, don't use \c{}
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 17:26:17 -07:00
H. Peter Anvin
cf538e23dd doc: tweak the HTML look of fixed text
Go for 90% rather than 80% size;
For inline (code) tags make font bold.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 17:22:56 -07:00
H. Peter Anvin
7582ebb22a doc: more HTML formatting hacks
Make the titles look nicer...

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 17:15:43 -07:00
H. Peter Anvin
55b179ef37 doc: add a few more items to the clean target
Add a few more things that should be cleaned up when making the
documentation...

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 16:30:57 -07:00
H. Peter Anvin
33f309c886 Merge remote-tracking branch 'maciej/apx.wip.for-hpa' 2025-09-29 15:30:13 -07:00
H. Peter Anvin
c67b688f37 doc: more HTML compliance and prettification work 2025-09-29 14:31:24 -07:00
H. Peter Anvin
0e253844da doc: prettify the HTML documentation
- Improve the look of the TOC
- Add some highlight to code blocks

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 11:28:12 -07:00
Maciej Wieczor-Retman
7db0df3a2d doc: Call/Jump subchapter and far call syntax
Start the subchapter on jmp and call syntax summary. Move the far call
syntax paragraph from language chapter to the syntax chapter.

Add a couple of paragraphs about possible syntaxes of the jump/call
instructions.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-29 15:08:04 +02:00
Maciej Wieczor-Retman
6cf6693fda doc: Add subchapter on NDS/NDD compact syntax
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-29 15:07:35 +02:00
Maciej Wieczor-Retman
9abbc4aa41 doc: 64 bit moffs in the syntax chapter
Mention 64 bit moffs and link to the section in the 64-bit chapter.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-29 15:05:42 +02:00
Maciej Wieczor-Retman
1653419dde doc: Move the split EA note to the syntax chapter
Add a split EA subchapter to the syntax chapter end remove it from the
language chapter, leaving a hyperlink to the new location.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-29 15:03:46 +02:00
Maciej Wieczor-Retman
b48741a833 doc: Add note on lack of syntax for the ternary logic instruction
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-29 14:59:57 +02:00
Maciej Wieczor-Retman
9eb39f7ff6 doc: Move APX doc to the syntax doc
The syntax chapter is supposed to be about concepts or instructions that
either have a lot of different syntaxes or new/odd ones.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-26 22:12:40 +02:00
Maciej Wieczor-Retman
0e55f84762 doc: Fix missing index tag
\I without anything in the curly brackets made the "procedure linkage
table" text disappear.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-26 22:12:40 +02:00
Maciej Wieczor-Retman
a9b35e56b2 doc: Fix missing closing curly brackets
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-26 22:06:14 +02:00
H. Peter Anvin
1fd289c340 doc: cccl for compiling with MSVC, source build section edits
Make a note about the availability of the cccl wrapper for building
with MSVC using GNU make.

Minor tidying up of the building from source section in general.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-25 12:08:58 -07:00
H. Peter Anvin
5a32fcb8a7 doc: fix instruction spelling: PPUSH -> PUSHP et al
The "paired" attribute is a suffix, not a prefix.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-23 16:00:24 -07:00
H. Peter Anvin
7e0dc756f5 doc: tidy up the APX documentation and a few other minor changes
Major tidying up of the APX chapter; do a couple of other minor fixes
in the process.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-23 12:00:31 -07:00
H. Peter Anvin
0393cf6502 doc: document that appendices C, D and E should be unchanged
Currently, the website links directly to appendix C, D, and E by name.

At some point, change the HTML generation to use the chapter names
rather than numbers.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-23 08:13:48 -07:00
Maciej Wieczor-Retman
a3191aee77 doc: apx: Document the APX syntax
Add documentation on how the new syntax elements related to APX work.

Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
2025-09-23 16:01:30 +02:00
H. Peter Anvin
f6166e571a preproc: implement %hs2b() and %b2hs() functions for compact binary data
Convenience preprocessor functions that allows for efficient packing
of binary data in source code.

Move some functions that has previously been local but are more
generally useful into more accessible places.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-15 23:01:59 -07:00
H. Peter Anvin
856ac7b7fb preproc: add %chr() and %ord() string <-> byte list functions
It is sometimes just too convenient to be able to convert between
strings and bytes at will. At one point I was considering making
something with the full power of the db (et al) directives, but that
is a much bigger change...

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-15 21:48:07 -07:00
H. Peter Anvin
75f7e2bfa6 doc: remove & used for list
Using & for a list is not consistent with the style elsewhere.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-14 23:52:22 -07:00
H. Peter Anvin
a25bc0a5d4 doc: fix broken section heading for DEFAULT BND
The section heading for DEFAULT BND was broken (missing \); make the
tags saner, too.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-14 23:50:43 -07:00
H. Peter Anvin
1ea955f981 doc: add "backwards" to "%if, compatibility" index entries
It is much clearer so, and it still fits.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-14 04:35:56 -07:00
H. Peter Anvin
31c4d8bcfd doc: describe caveat with old NASM and new %if directives
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>
2025-09-14 04:07:19 -07:00
H. Peter Anvin
1f1f3266d6 preproc: look for what looks to be an unknown conditional
If an unknown preprocessor directive starting with %if or %elif is
encountered, assume it should be treated as a conditional directive
for the purpose of balancing %if...%endif.

This avoids some really ugly problems when dealing with code that is
intended to work across NASM versions that uses %if directives that
don't yet exist.

Reported-by: E. C. Masloch <pushbx@ulukai.org>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-14 03:25:26 -07:00
H. Peter Anvin
7276cfde99 preproc: remove the message-generating functions
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>
2025-09-14 02:48:58 -07:00
H. Peter Anvin
84115eeca6 preproc: add %find() and %findi() functions
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>
2025-09-14 01:24:42 -07:00
H. Peter Anvin
4ccdf7e6fe preproc: add __?DEFAULT?__ macro representing the DEFAULT settings
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>
2025-09-14 00:38:50 -07:00
H. Peter Anvin
c719835357 Officially deprecate implicit DEFAULT ABS, add DEFAULT [FS|GS]:[ABS|REL]
Making DEFAULT ABS the default for 64-bit mode was a real
mistake. Issue a warning so we can eventually change it.

Support making FS: and GS: references also be REL by default.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-13 23:15:47 -07:00
H. Peter Anvin
014ca9fdb3 doc: document the %exitmacro directive
The %exitmacro directive was never documented, apparently...

Reported-by: E. C. Masloch <pushbx@ulukai.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2025-09-13 21:47:05 -07:00
H. Peter Anvin
53c2f24c3d doc: 3.0 -> 3.00; tidy up the language for __?NASM_HAS_IFDIRECTIVE?__
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>
2025-09-13 21:35:06 -07:00