Is there a difference between rel8 and rel16/rel32?

Viewed 380

In 3.1.1.3 of Intel's SDM, the rel8 symbol and the rel16 and rel32 symbols are listed separately and differ in more than operand-size.

For rel8 it says:

rel8 — A relative address in the range from 128 bytes before the end of the instruction to 127 bytes after the end of the instruction.

And for rel16 and rel32 it says:

rel16, rel32 — A relative address within the same code segment as the instruction assembled. The rel16 symbol applies to instructions with an operand-size attribute of 16 bits; the rel32 symbol applies to instructions with an operand-size attribute of 32 bits.

I'm just getting my feet wet in assembly, but to me, it looks like these symbols differ considerably. It looks like it's undefined whether rel16/rel32 can address bytes only after the instruction or both ways like it's described for rel8 (though iirc relative addresses are signed but it's still mentioned explicitly for rel8 and not for rel16/rel32), and also like rel8 doesn't care about code segments.

So, are there actually any differences between those symbols that go beyond operand-size?

0 Answers
Related