Instruction Set
4-99
JMP
Jump Unconditionally
JMP
What It Does
JMP stops executing the current sequence of instructions and begins executing a new
sequence of instructions.
Syntax
Description
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
rel8 form 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
rel16 and JMP r/m16 are near jumps. They use the current segment register value.
n
Near Direct Jumps: To determine the destination, the JMP
rel16 form adds an offset
to the address of the instruction following JMP. The JMP
rel16 form 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/m16 form specifies a register or memory location from
which the procedure absolute offset is fetched. The offset is 16 bits.
JMP
ptr16:16 and JMP m16:16 are 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:16 form uses a 4-byte operand as a long pointer to
the destination.
n
Far Indirect Jumps: The JMP
m16:16 form 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.
Summary of Contents for Am186 Series
Page 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Page 10: ...Table of Contents x...
Page 18: ...Programming 1 8...
Page 40: ...Instruction Set Listing 3 14...