XEROX
BUSINESS SYSTEMS
System Development Division
December 12, 1977
To:Mesa Language Working Group

From:Dick Sweet

Subject:
Mesa Language Working Group minutes

The Language Working Group met on 2 December, 1977. The topic of discussion was LONG POINTERs.
The long and short of NIL.
We talked about the value of NIL. Since a large number of users seem to have been burned by reading through NIL, it would be nice to set up the map to trap such references. It was noted that the current value, the last of the MDS, can lead with small offsets to references to the last page of the MDS, the first page of the MDS, and the first page beyond.
Another problem with NIL is the need for a long and a short form. The value of 0 seemed to have a lot going for it. We decided to try making a system with NIL = 0, and see whether anyone in the system was taking advantage of the actual value of NIL. Hence, the first page of the MDS would be out of the map, allowing invalid references to trap. The user should also be given a facility for removing pages in case he wishes to do a similar trick to catch invalid based pointer references.
How many bits in a LONG POINTER?
The two forms of LONG POINTERs, 24 and 32 bits, were discussed. After considerable discussion, we couldn’t come up with any important cases where the 32 bit form was superior to the 24 bit one. We decided to procede with implementation of the compiler as if only the 24 bit form existed, but to leave the 32 bit form in the firmware for now. Several puns were noted for taking advantage of the 32 bit form, but on closer inspection, one probably wants the base in the global frame, and the offset in the local one, and hence not contiguous.
Based Pointers.
The original proposal for based pointers had two types, the WORDBASE for intra-MDS references, and the PAGEBASE for general references. The PAGEBASE was thought to be a principal application for 32 bit pointers. Discussion of the various array and record accessing instructions lead to the conclusion that the PAGEBASE would be best stored as a 24 bit pointer with the last 8 bits = 0. This was seen as an unnecessary restriction, we should simply have short and long word bases.
Given the 24 bit form of long bases, we will probably benefit from instructions of the form LRXGP and LRXLP, that take a relative pointer on the stack, a long wordbase in one of the first 16 locations, and a 4 bit offset.
Compatibility.
How much of the long pointer stuff should be implemented on the Alto. At the very least, LONG POINTERs should take up two words in records and frames. The code generators could generate long pointer instructions, and have them taken out at the last minute by the peephole optimizer, similar to the way that other D* instructions are currently handled.