89

For once, I do have a direct source for a "Why didn't they ...?" question. Eric Isaacson, back in the late '80s and '90s, wrote a commercial assembler for the 8086, called A86. (His homepage still has a section offering it for sale for $50, $52 outside North America, and explaining why it's the best assembler on the market for DOS. You can even download ...


27

The 8085 is effectively the same as the 8080 microprocessor. The 8080 has a flat 16-bit address space and no segment registers. So yes, the 8085 uses real memory addresses without any translation.


26

The 8086 used a segmented memory architecture where the linear address was computed from a 16-bit segment number and a 16-bit offset. This greatly complicated things from a programming perspective. I beg to differ. Using segments doesn't 'complicate' things in any way. Sure, it may require a different style of structuring the data used and there are very ...


18

OS/2 supported “huge memory” on 286s. The New Executable format used for 16-bit OS/2 executables (and 16-bit Windows executables) supports multiple segments. At runtime, using the DosAllocHuge function, programs could allocate more than 64KiB of memory at a time, and would get a sequence of segment selectors which could be used to easily access all the ...


14

Simply Yes. A basic 8080/85 (or Z80) does just output the 16 bit address generated by an instruction. There is no inherent translation, Segmentation or whatsoever.


14

I am pretty sure the Intel engineers just weren't there, yet. And they were pressed by the market to push out a 16-bit CPU before all the others did to keep the market share they had already lost big time to small Zilog. (I am pretty sure that the design of the 8086 was much more driven by marketing pressure TTM and compatibility constraints than engineering ...


7

The 8086/8088 is designed to be a 16-bit CPU which means that its registers are all 16 bit wide. You can address 64kB with a 16-bit pointer, but the designers wanted to address more. So what are the options? You can add special registers that are larger than 16 bits. This would have complicated a lot of things: increasing all registers would have been ...


5

Source code compatibility (via assembly language translation) with the 8080/8085, as mentioned in the question, was a major design consideration with the 8086. To bootstrap the usefulness of the processor and get it into real systems as quickly as possible, allowing producers of existing software (especially CP/M) to get that software to work on the 8086 ...


5

There was never any integral type defined that corresponded to value of a segment the same way uintptr_t corresponds to the value of a pointer defined in any C compiler targeting x86 CPUs that I'm aware of. For that matter I don't know if any 16-bit segmented C compiler for x86 CPUs ever implement the uintptr_t type. You just had to know if you assigned a ...


5

We might speak to what happens within the CPU and what happens or can happen external to the CPU. Between the CPU and memory subsystem, there is an address bus and a data bus (among some other signals that indicate when to read or write). Each new CPU defines the number of address pins it provides, and this width (count) of the address bus (pins) generally ...


5

The Intel 8085 CPU can only send out 16-bit addresses. What happens to those 16-bit addresses is out of the control of the CPU. In a normal system, some number of those bits would be sent to every RAM and ROM chip in the machine. At the same time, the remaining bits would be passed to a decoder chip which has one output going to each of those memory chips....


4

Depends on the memory subsystem and what you mean by "real memory" and memory address. It's possible some 8085 systems had multiple external memory banks (e.g. totaling more than 64 kB) switched by an external register. Switchable ROM overlays were common, not sure about RAM. The bank switch pins might or might not be called address pins, but they do the ...


4

But the memory address that the segment register+offset register forms is not a real memory address, it has to be converted first into another real memory address and then it can be used for reading or writing. The only transformation is the “segment × 16 + offset” calculation, which yields a physical address which is emitted as-is on the address bus. There ...


3

There's another point I haven't seen anybody mention. When Intel released the 8086, they were already working on the iAPX 432. Intel's intent was that the iAPX 432 would be the CPU that would become popular in the desktop market. They were putting an immense amount of time and effort into the design. At least from what I've heard from a few former Intel ...


3

To summarize what @traal linked to above, the recommended practice for DOS systems was as follows: Pointers are 32 bit (unsigned long) To get the segment for a pointer use the FP_SEG macro from DOS.H To get a pointer's offset within a segment use the FP_OFF macro, also from DOS.H Both the segment and offset are unsigned i.e. uint16_t The macros are defined ...


2

No; size_t has to cover every possible size of a data structure which could be defined; as soon as a model allowed an array larger than 64kb, size_t had to be a 32 bit type, and there was no point in having a separate segment type.


2

In fact, both the 8086 and the 8085 use real addressing. The 8085, like the 8080, has a 16-bits address space from $0000 to $FFFF (65536 bytes). You can use any 16-bit register to hold an address, or push 2 bytes on the stack and return, use them in jumps etc. A 16-bit value in an addressing instruction or register directly matches a precise byte of memory ...


1

The 8086 was 16-bit processor, and thus could only access 64K of RAM. IIRC, the 8086 had 20 memory address lines, so it could address up to 1M of RAM. In order to directly address this memory, they would have needed at least 1 20-bit register. I'm assuming that was too expensive or difficult to fit into their architecture, so they decided to use the ...


1

It is convenient to be able to address data as separate from code. It is convenient to be able to set aside space for the stack so that you can guarantee that it won't overrun anything too. This arrangement means that the same 16 bit pointer operations (save, load, 16 bit increment) can still be used as in the i8088, but the address space is still increased....


1

For 80286 (or higher) processors, there is a Windows 3.x memory model that runs in protected mode to go beyond the real mode 1MB limit, using selectors instead of real mode segments. A block of selectors are used to access blocks of memory greater than 64KB, and incrementing a selector by 8 would point to the next 64KB block of memory. The increment value ...


Only top voted, non community-wiki answers of a minimum length are eligible