Re: x86 VM

new topic     » goto parent     » topic index » view thread      » older message » newer message

>Then would you mind explaining why NASM generates code for a relative jump(
>near)?
>
>Here's some assembly code:
>
>Jmp lbl
>Jmp short lbl
>lbl:
>

I have to correct myself on my last post. Near jumps *can* use relative
displacements.
"Jmp lbl" is likely to be translated into relative jump.


Here's some info from an Intel hlp-file:

EB cb JMP rel8 Jump short, relative, displacement relative to next
instruction

E9 cw JMP rel16 Jump near, relative, displacement relative to next
instruction

E9 cd JMP rel32 Jump near, relative, displacement relative to next
instruction

FF /4 JMP r/m16 Jump near, absolute indirect, address given in r/m16

FF /4 JMP r/m32 Jump near, absolute indirect, address given in r/m32

EA cd JMP ptr16:16 Jump far, absolute, address given in operand

EA cp JMP ptr16:32 Jump far, absolute, address given in operand

FF /5 JMP m16:16 Jump far, absolute indirect, address given in m16:16

FF /5 JMP m16:32 Jump far, absolute indirect, address given in m16:32





_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu