Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!brl-tgr!ron From: ron@brl-tgr.ARPA (Ron Natalie) Newsgroups: net.lang.c Subject: Re: portability; bit* Message-ID: <7018@brl-tgr.ARPA> Date: Sat, 5-Jan-85 00:10:28 EST Article-I.D.: brl-tgr.7018 Posted: Sat Jan 5 00:10:28 1985 Date-Received: Sun, 6-Jan-85 00:55:18 EST References: <2667@dartvax.UUCP> Distribution: net Organization: Ballistic Research Lab Lines: 28 > It isn't much of a portability argument that C runs on both PDP- > 11 and 370s. Both are byte addressed, though I believe the 370 > has more alignment constraints. > > Contrast C implementation on a Honeywell mainframe (as, I be- > lieve, Waterloo has done). The machine is word addressed, not > byte addressed. However there are string instructions and > pointers which can index by a character count. For that matter, > there are bit string instructions which can index by a bit count. > C and C programmers assume that the machine is easily character > addressed, but the language takes no notice of bit addressing. > > I therefore propose that the bit type be added to C, with atten- > dant bit*, bit[] bit(), etc. Actually, 370's are subject to about the same alignment considerations as a VAX. You don't have to align things, but it is a more efficient memory access if you do. If you really want horrors, try machines that have different address formats for various data types. Take the Denelcor HEP (take mine please). It has three address types. One for bytes and another for quarter, half, and full (64 bit words). The non-byte address sort of looks like the byte address except that if the lower three bits are 0 you are referring to the full word, 2 and 6 refer to the upper and lower half word, and 1, 3, 5, and 7 refer to the quarter words. -Ron