| <<< Unconditional Jumps | Index | Conditional Jumps >>> |
An indirect operand provides a pointer to the target address.
The indirect jump instructions use a 32-bit address for the target rather than a displacement.
However, this address is not encoded in the instruction itself.
Instead, it is either in a register or in a memory doubleword.
For example,
jmp edx
means to jump to the address stored in EDX.
.DATA
jump_anywhere
DWORD ?
.CODE
;
jmp eax ; register indirect jump
;
jmp quit_program ; unconditional relative jump
;
jmp jump_anywhere ; memory indirect jump
;
jmp dword ptr [edi] ; jump via pointer to a variable that contains an address
quit_program:
;
Sample one: jump_demo.asm
Sample two: jump_table.asm
| <<< Unconditional Jumps | Index | Conditional Jumps >>> |