Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: $Revision: 1.6.2.16 $; site ima.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!harvard!talcott!panda!genrad!mit-eddie!think!ima!johnl From: johnl@ima.UUCP Newsgroups: net.micro Subject: Re: Re: ANOTHER 32-BIT MACHINE??? (L O Message-ID: <38800003@ima.UUCP> Date: Wed, 8-May-85 12:26:00 EDT Article-I.D.: ima.38800003 Posted: Wed May 8 12:26:00 1985 Date-Received: Sat, 11-May-85 08:41:31 EDT References: <1721@ukma.UUCP> Lines: 32 Nf-ID: #R:ukma:-172100:ima:38800003:000:1860 Nf-From: ima!johnl May 8 12:26:00 1985 > Never having had the need to write huge programs, how often does one really > come across the need for larger segments? All the time, really. On the 8086 family, the biggest problem is that the 8086's segment architecture does not fit at all well with the addressing models in the sorts of programming languages that people use, for example C. Most C compilers put static and automatic data in one segment, because the code generated that way is much better than it would be if everything were in a separate segment, and pointers had to remember what segment their pointees reside in, or if (much worse) there were different types of pointers for "pointer to stack," "pointer to local static," "pointer to global static," "pointer to stack passed from some other routine," and so forth. The 8086 architecture is as far as I can tell unique among modern computers because there is no way at all to treat address space as a linear array. (You can simulate it with lots of instructions, but that's not what I mean.) [No, I take it back, the PDP-11 has the segmentation problem even worse, but everybody admits the 11's addressing is a mess.] The VAX's addressing is segmented, too, but the segments are large and, more important, you can pass around and dereference pointers easily and quickly without having to worry about which segment a pointer points into. What we all hate about the 8086 is that you have to be thinking about segments every second when you're writing programs. Finally, on the 286 at least, segmentation is slow. Loading and dereferencing a pointer within the current data segment takes about 10 cycles, while loading and dereferencing a segment+offset pointer takes about 26. Ugh and a half. John Levine, Javelin Software, Cambridge MA 617-494-1400 { decvax!cca | think | ihnp4 | cbosgd }!ima!johnl, Levine@YALE.ARPA