pointer representation (was: Re: effect of free())

Richard O'Keefe ok at cs.mu.oz.au
Fri Sep 15 16:06:27 AEST 1989


In article <206 at titania.warwick.ac.uk>, cudcv at warwick.ac.uk (Rob McMahon) writes:
> Who remembers the Burroughs B6700, which had (in Algol)
> 	POINTER A, B;
> 	IF A = B THEN ...
> vs
> 	IF A IS B THEN ...

I remember the B6700, with considerable fondness.  You have got it _wrong_.
The difference between = and IS concerned _numbers_.  The B6700 used 3 tag
bits and 48 data bits (double it for double precision, where tag=2).  The
numeric representation was that floating point numbers were
	sign x (8 ** exponent) * mantissa.0
(octonary point on the _right_, so no hidden bit) and integers were just
floats with exponent 0.  There were 39 bits of mantissa, and the 48th
bit of the word was ignored.  (I believe this was for backwards
compatibility with the B5500/5700, where the 48th bit was the tag bit.)
'=' compared numbers for numeric equality, treating -0.0 the same as +0.0,
ignoring the 48th bit, and normalising as required.
'IS' compared 48-bit words for bitwise identity.  This was useful if you
were using them as bit-vectors (bitwise operations on REALs gave you the
full 48 bits) or to hold characters (6 EBCDIC characters in one word).
If I remember correctly, the SAME instruction also compared tags.

For a comparison, consider IBM/370 floating-point numbers.  They are not
necessarily normalised, and can represent both +0.0 and -0.0.  Using the
floating-point comparison instructions would be like '=', comparing /370
floats using integer comparisons would be like 'IS'.



More information about the Comp.lang.c mailing list