Post by Tim RobertsPost by VinnieI 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:
Intel>>>>>
"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)
<<<<<
NASM>>>>>
"B.4.130 JMP: Jump
JMP imm ; E9 rw/rd [8086]
JMP SHORT imm ; EB rb [8086]"
<<<<<
which leads me to the conclusion that the answer to the question would
be:
'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:
http://nasm.sourceforge.net/
and the Intel reference manual can be found here:
http://www.intel.com/design/PentiumIII/documentation.htm
R. Kj.
--- as life grows older, I gain Experience.