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

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>
This commit is contained in:
Maciej Wieczor-Retman
2025-09-29 15:03:46 +02:00
parent 1653419dde
commit 9abbc4aa41
2 changed files with 13 additions and 0 deletions

View File

@@ -62,6 +62,8 @@ In 64-bit mode, immediates and displacements are generally only 32
bits wide. NASM will therefore truncate most displacements and bits wide. NASM will therefore truncate most displacements and
immediates to 32 bits. immediates to 32 bits.
\S{id64imm} Immediate 64-bit Operands
The only instruction which takes a full \i{64-bit immediate} is: The only instruction which takes a full \i{64-bit immediate} is:
\c MOV reg64,imm64 \c MOV reg64,imm64
@@ -97,6 +99,8 @@ instruction is able to reference a symbol anywhere in the 64-bit
address space, whereas \c{LEA} is only able to access a symbol within address space, whereas \c{LEA} is only able to access a symbol within
within 2 GB of the instruction itself (see below.) within 2 GB of the instruction itself (see below.)
\S{id64disp} 64-bit Displacements
The only instructions which take a full \I{64-bit displacement}64-bit The only instructions which take a full \I{64-bit displacement}64-bit
\e{displacement} is loading or storing, using \c{MOV}, \c{AL}, \c{AX}, \e{displacement} is loading or storing, using \c{MOV}, \c{AL}, \c{AX},
\c{EAX} or \c{RAX} (but no other registers) to an absolute 64-bit address. \c{EAX} or \c{RAX} (but no other registers) to an absolute 64-bit address.

View File

@@ -1,5 +1,14 @@
\C{Syntax} Syntax Quirks and Summaries \C{Syntax} Syntax Quirks and Summaries
\H{64moff} 64-bit \i{MOFFS}
The moffs operand can be used with the \c{MOV} instruction, only using the A
register (AL/AH, AX, EAX, RAX), and for non-64-bit operand size means to address
memory at an offset from a segment. For \I{64-bit immediate} 64-bit operands it
simply accesses memory at a specified offset (since segment based addressing is
mostly unavailable in 64-bit mode). Syntax to use 64-bit offsets to address
memory is showcased in \k{id64disp}.
\H{spliteas} \i{Split EA} Addressing Syntax \H{spliteas} \i{Split EA} Addressing Syntax
Instructions that use the mib operand, (that is memory addressed with a base Instructions that use the mib operand, (that is memory addressed with a base