
Instruction Set
4-99
J MP
J ump Unc onditionally
J MP
What It Does
JMP stops executing the current sequence of instructions and begins executing a new
sequence of instructions.
S yntax
Desc ription
JMP transfers control to a different point in the instruction stream without recording return
information. The instruction has several different forms, as follows:
n
Short Jumps:
To determine the destination, the JMP rel8form adds a signed offset to
the address of the instruction following JMP. This offset can range from 128 bytes before
or 127 bytes after the instruction following JMP.
JMP rel16and JMP r/m16are near jumps. They use the current segment register value.
n
Near Direct Jumps:
To determine the destination, the JMP rel16form adds an offset
to the address of the instruction following JMP. The JMP rel16form is used for 16-bit
operand-size attributes (segment-size attribute 16 only). The result is stored in the 16-
bit IP register.
n
Near Indirect Jumps:
The JMP r/m16form specifies a register or memory location from
which the procedure absolute offset is fetched. The offset is 16 bits.
JMP ptr16:16and JMP m16:16are far jumps. They use a long pointer to the destination.
The long pointer provides 16 bits for the CS register and 16 bits for the IP register.
n
Far Direct Jumps:
The JMP ptr16:16form uses a 4-byte operand as a long pointer to
the destination.
n
Far Indirect Jumps:
The JMP m16:16form fetches the long pointer from the specified
memory location (an indirect jump).
Form
Opcode
Description
Clocks
Am186 Am188
JMP rel8
EB cb
Jump short direct, displacement relative to next instruction
14
14
JMP rel16
E9 cw
Jump near direct, displacement relative to next instruction
14
14
JMP r/m16
FF /4
Jump near indirect
11/17
11/21
JMP ptr16:16
EA cd
Jump far direct to doubleword immediate address
14
14
JMP m16:16
FF /5
Jump m16:16 indirect and far
26
34
JMP label
To jump unconditionally, use JMP.