Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!pyramid!prls!philabs!linus!nixbur!nixpbe!mboen From: mboen@nixpbe.UUCP (Martin Boening) Newsgroups: comp.sys.atari.st Subject: Re: Is this right? Message-ID: <277@nixpbe.UUCP> Date: 27 Apr 89 06:33:52 GMT References: <8904241544.AA21773@ucbvax.Berkeley.EDU> Organization: Nixdorf Computer AG, Paderborn, Germany Lines: 57 01659@AECLCR.BITNET (Greg Csullog) writes: >Someone please correct me if I am wrong, but my understanding of the 8088, >80286 and 80386 family is that the junior member (the 8088) requires memory >segmentation to work (i.e. 10 banks of 64K). Even if you have an 80286 or >an 80386, most codes out there are compiled to run on the 8088 and still >use the memory segmentation protocols. Therefore, even if you have an 80286 >or an 80386, with these segmented codes, you cannot use the true power of the >processors - all you can take advantage of is the faster clock times. Is >this right? I also understand that Windows 286 and 386 DO take advantage of >the newer processors. Is this right? Seems to me, if you use segmented codes >on a 80286 machine, you're bound to have a lower performance standard than >a Mac or an ST with a 68000 and their codes which are not segmented. Is this >right? I think I can answer that one, but maybe I'm wrong. As far as I know you don't need segmented memory, you get it by default. The 8088 addresses memory with a 20-Bit address bus (so 1 Meg is the upper limit on that one). The segmentation comes about because internally the processor uses 16-bit addresses that are overlayed with the contents of segment registers to get 20-bit addresses. There are the segment registers CS (for the code segment, used to build 20-bit addresses in combination with the PC), DS (data segment register), SS (stack segment register) and ES (extra segment register). Theoretically you can therefore in a program use 64 KB of code (the socalled text area in C), 64K of stack and 64K of data by simply loading the segment registers concerned. C compilers support several memory models accordingly, one of which (the HUGE model) is supposed to shield the programmer from the segmentation and making the whole 1MB available (not quite, since the special PC arcitecture has memory mapped I/O with I/O addresses above the 640KB boundary). On the assembler level you can always reload the segment registers and have a different data or stack or extra segment.Special addressing modes allow you to specify which segment register in combination with which 16 Bit internal register (or absolute value or whatever) is used to create the absolute 20-Bit memory address. The CS can only be reloaded by ominous 'far call', not by any direct statement, though. Summary: you don't NEED segmented memory. The processor segments it. I think the more powerful processors like 80286 and 80386 support two modes, one of which (protected mode, maybe?) supports this segmentation. In order not to lose all that nifty software written at the time of the 8088/8086 and because MANY PC@s are still delivered with those old processors most software is still designed to run on them. Maybe everything gets better with OS/2. I hope this wasn't too confusing. I hope I got most of it right. I'm NOT a PC owner (I own an Atari Mega ST2 with grand 2MB RAM, which can be addressed linearly). Martin Email: (North and South America) -> ...!uunet!philabs!linus!nixbur!mboening.pad (Europe) -> ...!unido!nixpbe!mboening.pad -- Email: in the USA -> ...!uunet!philabs!linus!nixbur!mboening.pad outside USA -> {...!mcvax}!unido!nixpbe!mboening.pad