Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!styx!ames!ucbcad!ucbvax!ulysses!ggs From: ggs@ulysses.UUCP (Griff Smith) Newsgroups: comp.lang.c Subject: Re: machines with oddball char * formats Message-ID: <1475@ulysses.UUCP> Date: Tue, 18-Nov-86 08:42:31 EST Article-I.D.: ulysses.1475 Posted: Tue Nov 18 08:42:31 1986 Date-Received: Tue, 18-Nov-86 21:15:18 EST References: <1011@zog.cs.cmu.edu> Organization: AT&T Bell Laboratories, Murray Hill Lines: 39 > Although I don't know the details, from what I have heard the DEC-20 suffers > from a similar problem. Suffers is a strong word, and it wasn't a problem. Remember, the machine was around years before C was invented. I think you are saying that any machine that punishes violation of strict pointer typing is broken. > Wordsize is 36 bits, I think all pointers are 18-bits > and chars can not be packed to have a pointer to them. If this is true, you are talking about a brain-damaged C compiler. A pointer can be 18 bits, but REAL pointers are 36 bits and they can point to any arbitrary byte in a word. Probably the most unfortunate feature of the pointer structure is that it doesn't happen to fit accepted C coding idioms. The hardware works best if a byte copy loop is written as while (*++op = +++ip); when we all know that the "correct" (i.e. VAX order) way to do it is while (*op++ = +ip++); What does all this prove about the "goodness" or "badness" of the machine? Nothing! It was a clean, RISK-like architecture that was a joy to program. But people don't program in assembly much any more and the idioms for the machine don't happen to map into ones that are favored in current high-level languages. The machine was a victim of culture drift. Perhaps we should be taking courses in the history of design, with proper attention given to the cultural forces that lead to design decisions. -- Griff Smith AT&T (Bell Laboratories), Murray Hill Phone: (201) 582-7736 UUCP: {allegra|ihnp4}!ulysses!ggs Internet: ggs@ulysses.uucp