On Thu, 29 Jun 2000, Martin v. Loewis wrote:
[snip]
> > On the i386 platform relative jumps are limited to an 8 bit signed
> > offset. In order to jump further than this the jumps must be threaded (I
> > may be wrong about this, in truth it has been a while since I did any
> > assembly on the Intels).
> 
> No. On the i386 platform, *all* jumps are PC-relative (except for the
> indirect ones), so you can jump relatively to about any location you
> want.

My Intel Software Developer's Manual:  Instruction Set Reference seems to
be saying that things are more complex than that.  Conditional jumps can
be relative to CS (near jump) or relative to CS:EIP (short jump).
Unconditional jumps can be relative to CS, relative to CS:EIP, or relative
to a new value that the jump will load into CS (far jump).  Only short
jumps take any notice of the current EIP value.  So all jumps are
*segment*-relative, but not all are PC-relative.

(In protected mode CS indexes the descriptor table, and the segment base
is found there, but the effect is similar for the purpose of this
discussion.)

I'll let the philosophers argue whether or not a jump relative to a
segment with base of zero is absolute.

-- 
Mark H. Wood, Lead System Programmer   [EMAIL PROTECTED]
Life was so much simpler on the PDP-10.

Reply via email to