pointer question

usenet usenet at abnjh.UUCP
Sat Mar 17 08:25:41 AEST 1984


Another example of a machine where pointers to ints are significantly
different from pointers to chars is the Sperry 1100 series.  They are
also 36 bit word addressable machines with add-ons to the instruction
set to allow working with character strings.  (Note, I said strings,
NOT individual characters -- and no, the latter is not a special case
of the former.  If you want the details, ask me by email, there is no
point in bothering the net with them.)  extracting a character from a
word in memory is possible, but complicated.  Due to 'upward
compatibility' mania the basic pointer to integer will fit into a
half-word (18 bits) (And yes, this means you cannot have a program
bigger than 256K words. And yes, this is a pain.  And yes, later
models in the series allow you to get around this restriction by
standing on your head and spitting thru your teeth, but it is still a
pain.)  But a pointer to a character string encodes the starting word,
the starting character and the character size (usually a quarter
word -- 9 bits -- but other sizes are possible, including 6, 12
and 18 bits).  All of this uses up most of a 36 bit word.  The string
length is encoded in a separate word.

Rick Thomas.
ihnp4!abnjh!usenet   ihnp4!abnji!rbt



More information about the Comp.lang.c mailing list