ASM x86 relative JMP?

X86 supports a short jump (JMP, opcode EB + 1 byte relative address) which should do what you want.

Up vote 0 down vote favorite share g+ share fb share tw.

I'm doing some ASM code in a C code with the asm function. My environment 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 gcc assembly x86 link|improve this question asked Mar 21 '10 at 22:51benlaug375 60% accept rate.

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.

1 I've just tried this out in GCC, and it does work (jumping to labels). But you beat me to the post! – Michael Williamson Mar 21 '10 at 23:05.

In gcc, using + in inline asm is illegal. Also, that syntax looks wrong to me. Do some digging to look up the proper syntas for AT&T assembly.

Which is what GNU uses. Edit: Unless, of course, you'd rather use labels :).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions