Post by Tim Roberts Post by Vinnie
I need the hex value for: jmp short loc_0040149D
or in OllyDbg: jmp short Wpp.0040149D
Is there anyone that knows how to calculate those values, or has any url's
with info on opcodes and how to calculate to hex??
The short jmp instruction is E9, but it is a relative instruction: the
operand is the offset to the destination. Thus, the actual instruction
will depend on the instruction's location.
I think you err about the opcode,
she asked about the 'jmp short' instruction and let me qoute both
the Intel Reference Manual and the nasm Documentation:
"EB cb JMP rel8 Jump short, relative"(cut to fit on 1 line)
"E9 cw JMP rel16 Jump near, relative"(cut to fit on 1 line)
"E9 cd JMP rel32 Jump near, relative"(cut to fit on 1 line)
"B.4.130 JMP: Jump
JMP imm ; E9 rw/rd 
JMP SHORT imm ; EB rb "
which leads me to the conclusion that the answer to the question would
'jmp short' opcode is EB, but its distination is a relative offset just
1 byte large which means it ranges from -128 to 127 bytes.
the nasm documentation can be found here:
and the Intel reference manual can be found here:
--- as life grows older, I gain Experience.