Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- iAPx86 - <b>jmp jump unconditionally flags: not altered (*)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
JMP             Jump Unconditionally                 Flags: Not altered (*)
                                                     (*) If task switch
JMP destination                                      occurs, all flags
                                                     are affected
        Logic   if FAR jump
                   CS . destination_segment
                endif
                eIP . destination_offset

    JMP unconditionally transfers control from one code segment
    location to another. These locations can be within the same code
    segment (near jump = intra-segment) or in different code segments
    (far jump = inter-segment).

    JMP's implementation varies depending on whether the address is
    directly specified within the instruction or indirectly through a
    register or memory operand. A direct JMP includes the destination
    address as part of the instruction. An indirect JMP gets the
    destination address through a register or pointer variable. An
    indirect JMP specifies an absolute address in one of the following
    ways:

    - a register modifies the address of the memory pointer to select
      a destination address
    - the program can JMP to a location specified by a general
      register -- the CPU moves this value into the instruction
      pointer and resumes execution
    - the CPU obtains the destination address from a memory operand
      specified in the instruction

    Note
    JMP does not save a return address on the stack as CALL does.


    Opcode      Format
    E9 cw       JMP  rel16
    E9 cd       JMP  rel32
    EA cd       JMP  ptr16:16
    EA cp       JMP  ptr16:32
    EB cb       JMP  rel8
    FF /4       JMP  r/m16
    FF /4       JMP  r/m32
    FF /5       JMP  m16:16
    FF /5       JMP  m16:32


    Length and timing
    Operands    Bytes   8088    186     286     386     486     Pentium
    short        2      15      13      7+m     7+m      3       1   PV
    near         3      15      13      7+m     7+m      3       1   PV
    far          5      15      13     11+m    12+m     17       3   NP
    r16          2      11      11      7+m     7+m      5       2   NP
    mem16      2+d(0,2) 18+EA   17     11+m    10+m      5       2   NP
    mem32      2+d(4)   24+EA   26     15+m    12+m     13       4   NP

    r32          2       -       -       -      7+m      5       2   NP
    mem32      2+d(0,2)  -       -       -     10+m      5       2   NP
    mem48      2+d(6)    -       -       -     12+m     13       4   NP

             Cycles for jumps through call gates not shown

See Also: CALL Jcc Task switch

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson