[M3devel] LONGINT, my original proposal

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Fri Jan 8 19:34:17 CET 2010


On Fri, Jan 08, 2010 at 10:53:42AM -0600, Rodney M. Bates wrote:
> 
> 17. Neither LONGINT, nor any subtype thereof, can be used as the base
>     type of a set type.
> 
>       This is similar to the array index limitation.  Sets on base
>       types of long range are very unlikely, as they would be too bit.

"too big", not "too bit"

>       The assignability rules should make subranges of INTEGER
>       relatively easy to use as set base types instead of short
>       subranges of LONGINT.  This also obviates generalizing IN.
> 
> 27. There is a new required interface named LongAddress.  It is UNSAFE
>     and contains procedures that are equivalents for the 5 unsafe
>     ADDRESS arithmetic operations, with LONGINT substituted in place
>     of INTEGER in their signatures.  These are given in 2.7 and
>     include a +, two overloaded meanings of -, an INC, and a DEC.
> 
>       It is remotely conceivable that there could be a target whose
>       native address size is longer than its native integer size
>       (unlike the reverse.)  In such a case, these operations might be
>       needed.

The IBM 360 had three-byte addresses, but a four-byte integer.
However, they had to be four-byte aligned, and were usually handled 
using four-byte operations.  However, OS code (in assembler) often 
stuffer various non-address flags in the extra byte, so except for 
its massive obsolescence, this would be a real consideration.  The IBM 
370 had special instructions for loading and storing the three address 
bytes of a machine word, making this a little cleaner.  I'm told a later 
version of this architecture switched to four-byte addresses, causing a 
very expensive rewrite of a huge amount of code.

-- hendrik



More information about the M3devel mailing list