JMP jumps to a given address. The address may be specified as an
absolute segment and offset, or as a relative jump within the
current segment.
JMP SHORT imm has a maximum range of 128 bytes, since the
displacement is specified as only 8 bits, but takes up less code
space. NASM does not choose when to generate JMP SHORT for you:
you must explicitly code SHORT every time you want a short jump.
You can choose between the two immediate far jump forms (\c{JMP
imm:imm}) by the use of the WORD and DWORD keywords: \c{JMP
WORD 0x1234:0x5678}) or JMP DWORD 0x1234:0x56789abc.
The JMP FAR mem forms execute a far jump by loading the
destination address out of memory. The address loaded consists of 16
or 32 bits of offset (depending on the operand size), and 16 bits of
segment. The operand size may be overridden using \c{JMP WORD FAR
mem} or JMP DWORD FAR mem.
The JMP r/m forms execute a near jump (within the same
segment), loading the destination address out of memory or out of a
register. The keyword NEAR may be specified, for clarity, in
these forms, but is not necessary. Again, operand size can be
overridden using JMP WORD mem or JMP DWORD mem.
As a convenience, NASM does not require you to jump to a far symbol
by coding the cumbersome JMP SEG routine:routine, but instead
allows the easier synonym JMP FAR routine.
The JMP r/m forms given above are near calls; NASM will accept
the NEAR keyword (e.g. JMP NEAR [address]), even though it
is not strictly necessary.