وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

JMP

JMP 

Usage:  JMP  label                                Modifies flags: None

Unconditionally transfers control to 'label'.  Jumps by default are within -32768 to 32767 bytes from the instruction following the jump.  NEAR and SHORT jumps cause the IP to be updated while FAR jumps cause CS and IP to be updated.

Jump


JMP imm                       ; E9 rw/rd             [8086]

JMP SHORT imm                 ; EB rb                [8086]

JMP imm:imm16                 ; o16 EA iw iw         [8086]

JMP imm:imm32                 ; o32 EA id iw         [386]

JMP FAR mem                   ; o16 FF /5            [8086]

JMP FAR mem32                 ; o32 FF /5            [386]

JMP r/m16                     ; o16 FF /4            [8086]

JMP r/m32                     ; o32 FF /4            [386]


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. RosAsm does not choose when to generate JMP SHORT for you: you must explicitly code  a SHORT jump by making use for Local Meaningless labels.


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 JMP WORD FAR mem  or JMP DWORD FAR mem.


The JMP r/m forms execute a 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.


EXAMPLE:

xor eax eax

L1: add eax 5

cmp 40 | jz label2

jmp L1

Label2:


 

JMP