ASM x86 relative JMP
I'm doing some ASM code in a C code with the asm function.
My env开发者_C百科ironment is DVL with gcc version 3.
Hi need to make a JMP to a relative address like %eip+0x1f.
How can I do this ?
Thanks
x86 supports a short jump (JMP, opcode EB + 1 byte relative address) which should do what you want.
In most assemblers (including gcc's inline asm IIRC) you can just put a label where you want to jump to, and use jmp mylabel
and let the assember figure out the correct opcode and relative address for the jump.
精彩评论