Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!bionet!agate!darkstar!kithrup!sef From: sef@kithrup.COM (Sean Eric Fagan) Newsgroups: comp.arch Subject: Re: Segmented Architectures ( formerly Re: 48-bit computers) Message-ID: <1991Apr04.023845.3501@kithrup.COM> Date: 4 Apr 91 02:38:45 GMT References: <7920@uceng.UC.EDU> <3310@crdos1.crd.ge.COM> Organization: Kithrup Enterprises, Ltd. Lines: 33 In article peter@ficc.ferranti.com (Peter da Silva) writes: >And then on top of all >that we have all the segmentation woes. Are you objecting to segments, or to *intel* segments? You keep saying "segments are bad," without regard to what type of segments. Consider, for example, a cpu which has two type of registers: data and address. Data registers are 32-bits, and address registers are 64-bits. *However*: the address registers are actually <32-bit segment tag> <32-bit offset> I defy you to come up with a PROPERLY WRITTEN program that will break. Now, for initial implementations, you probably want to use only one segment (i.e., limited to 4Gbytes), and have your compiler spit out lots of warning for things like passing pointers to functions without a prototype, conversion from pointer to integer, etc. (You should probably make that segment be tag #0, incidently, although there is no real need.) Note that you would also probably need a 'long long' type, since I seem to recall ANSI C requiring *some* integral type that can hold a pointer. That could actually be quite useful. Have each malloc() return a seperate segment, which is the size you requested and no larger... Intel goofed (imho) by having seperate segment registers. If the segment tag/number were part of the address registers, I don't think there would have been as much pain involved. -- Sean Eric Fagan | "I made the universe, but please don't blame me for it; sef@kithrup.COM | I had a bellyache at the time." -----------------+ -- The Turtle (Stephen King, _It_) Any opinions expressed are my own, and generally unpopular with others.