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

798 Commits

Author SHA1 Message Date
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
H. Peter Anvin
746fe8384d doc: even more tidying up of text and index
Purely editorial cleanups.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-05 23:59:10 -07:00
H. Peter Anvin
90e37ce7f1 doc: more index tweaks and removal of really really old information
Tidy up the index some more, and remove some very, very out of date
information.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-05 23:36:10 -07:00
H. Peter Anvin
419f369b42 doc: a few more index tweaks
Very minor cleanpus to the index.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-05 17:53:48 -07:00
H. Peter Anvin
7cc5291ece doc: tweaks to the index
Make the index at least a little bit more legible.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-05 17:51:38 -07:00
H. Peter Anvin
1d63ae2a3b doc: update the documentation, and auto-generate some indexes
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>
2025-09-05 17:12:06 -07:00
H. Peter Anvin
78c98dac0f version: bump version number to 3.0rc0
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>
2025-09-05 01:12:27 -07:00
H. Peter Anvin
bb253780ab changes.src: update release log
Add updates to the release documentation.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-04 20:08:15 -07:00
H. Peter Anvin
31a160759d Add %ifdirective preprocessor directive
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>
2025-09-04 19:41:12 -07:00
H. Peter Anvin
d5bd136ced preproc: add message-generating and %null() functions
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>
2025-09-04 17:10:42 -07:00
H. Peter Anvin
e0d5333a47 doc: add 2.17 release notes and document [dollarhex]
Add the beginnings (at least) of release notes for 2.17, and document
the [dollarhex] directive.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-03 12:31:03 -07:00
H. Peter Anvin
38631c577a doc: there is no %fullpath() function, only %realpath()
Remove a reference to a non-existent %fullpath() function; the
function is called %realpath().

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-03 01:10:29 -07:00