pointer question
Hans Albertsson
hans at log-hb.UUCP
Wed Mar 14 22:28:09 AEST 1984
[come & get it ]
I know one machine where pointers are not just different
length, but different data structures as well. I'm thinking
of the DEC PDP-10, a 36-bit machine, ( VERY nice.. ) where
most stuff gets put in an integral no. of full words, and a
pointer to one of these objects is 18 bits, that is a Half-word.
However, characters can have one of many representations,
usually, but not always, 7 bits each ( other usual sizes are
5 or 6 bits ), and packed an integral no. of characters in a
word, usually 5 7-bit char:s ( = 35 bits ) in a word. The left-
over bit is ignored... This means that a "pointer" to a
character string is a complex structure, containing A) the
starting address, B) the "Byte Size" in bits plus the "Byte
Number" you're presently looking at. It takes up MOST of a
36-bit word.
Other examples probably exist.
More information about the Comp.lang.c
mailing list