NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: blablub on January 21, 2011, 05:50:22 PM
-
Hi,
I was wondering how to use jmp short immediate correctly. Basically what I want to get is "EB 03" but "jmp short 3" gives "error : coff: invalid relocation size" (technically I'm using YASM).
Thanks in advance.
-
jmp short immediate is a tricky one! We write "jmp target", and it disassembles as "jmp target", but if you look at the encoding, the operand is "distance to target" (signed - a signed byte in the case of "short"). The easiest thing for you to do is:
db 0EBh, 3
...if that's really what you want to do...
Best,
Frank
-
Works perfectly, thanks!