News for hackers. Stuff that matters.
Re:A look at the die of the 8086 processor by mrlonglong on Wednesday June 17, 2020 @03:19PM (#23555543)
You gotta love that weird segmented memory model though, to allow it to address up to 1MB of RAM using 20 lines, combining a pair of 16 bit registers to generate the 20 bit address. The Motorola 680x0 was a bit saner.
Re:A look at the die of the 8086 processor by kabdib on Wednesday June 17, 2020 @04:25PM (#23556298)
I think that the face of computing would have changed quite dramatically if Intel had decided to make the x86 segment paragraph size 256 bytes (8 bits) instead of the useless 4 bits. Imagine not having a 640K (or 1MB) ceiling (without hacks like "expanded" or "extended" memory). It would not have been a big deal for Intel to do this; I'm pretty sure they could have multiplexed four more pins worth of address lines.

It would have given the x86 a native 24MB address space, equal to the 68000's physically provisioned 24 bits (which is all most 68K systems supported anyway, certainly the Atari ST and the Mac).

For instance, in the mid 80s, VisiCorp was trying really, really hard to fit their products into 640K. They had some whizzy stuff, but the address space problem pretty much killed them. Later, Microsoft and IBM came along, did the disgusting memory-space hacks that plagued users for a decade or more, and VisiCorp foundered.

Re:A look at the die of the 8086 processor by Someone on Wednesday June 17, 2020 @05:25PM (#23556970)
“It would have given the x86 a native 24MB address space, equal to the 68000's physically provisioned 24 bit”

That would be 16MB (plus possibly 65,536-256 bytes, depending on whether they added a bug on address wraparound (https://en.wikipedia.org/wiki/A20_line)).

Also, the 68000 would still have the clearer upgrade path, as the 24 address lines restriction was in the design of the chip, not in its architecture. As long as code didn’t assume addresses were modulo 2²⁴, code would run unmodified on a CPU with over 16MB memory, and use all of it.

Also, the idea with the 8086 was that programs would actually use 16-bit pointers for objects, not 20-bit ones. That would be wasteful of memory if the granularity of such addresses were 256 bytes.

Re:A look at the die of the 8086 processor by kabdib on Wednesday June 17, 2020 @06:34PM (#23557606)
I meant 16MB, of course. Duh.

Argument still stands.

Re:A look at the die of the 8086 processor by mschaef on Thursday June 18, 2020 @10:06AM (#23563219)
> I think that the face of computing would have changed quite dramatically if Intel had decided to make the x86 segment paragraph size 256 bytes (8 bits) instead of the useless 4 bits.

I've made that argument in the past too, but I tend to think the 8-bit paragraph shift would've been a nice third mode on the 286 (or maybe a second mode on the 186). So a 286 would've had:

* Real mode with 4 bit shift

* Real mode with 8 bit shift

* Protected mode with indirection through descriptor tables

It seems plausible to me that it would've been possible to make software that would have binary compatible with either of the two real modes, which was not possible between real and protected. That would've opened up 286 users to easier access to memory beyond 1MB.

But I don't know that this would've been a huge change for the industry, aside from killing off the need for LIM/EMS bank switching between 1985 and its death at the hands of Windows 3.0 in 1990. (And towards the later end of that period, the 386 could be made to provide EMS memory without additional hardware.)

I think the best argument for it being a major change is that it might have undermined the need for OS/2.... but even then, OS/2 was the way it was, not due to memory constraints, but due to IBM's need to attempt to regain control of a market it'd lost control over. So 8-bit paragraphs would've been nice for big spreadsheet/dBase users in the 1986-88 period, but not much nore than that.

(And all of this is just five or six years, really.... no time at all.)

Re:A look at the die of the 8086 processor by cesarb on Wednesday June 17, 2020 @04:36PM (#23556424)
> if Intel had decided to make the x86 segment paragraph size 256 bytes (8 bits) instead of the useless 4 bits

It would also have increased memory fragmentation. Many memory allocations were aligned to a segment boundary, so you'd be wasting up to 255 bytes instead of up to 15 bytes on each allocation.

Re:A look at the die of the 8086 processor by mrlonglong on Wednesday June 17, 2020 @07:58PM (#23558285)
Actually there aren't any alignment issues with the 8086, as it's still a 8 bit processor at heart.
Re:A look at the die of the 8086 processor by mschaef on Thursday June 18, 2020 @10:18AM (#23563328)
Segment alignment. Not read alignment.

Large model memory allocators would allocate memory on segment boundaries. This is more or less essential if you need to use more than 64K of memory in your program.

An 8-bit paragraph size (rather than the 4 that were used) would've forced all segment allocations to 256-byte boundaries, so that's where the fragmentation issue comes from.

Steve Morse (one of the designers of the chip) talks about the issue in page 16 of this: https://www.stevemorse.org/8086history/8086history.pdf

Re:A look at the die of the 8086 processor by Narishma on Thursday June 18, 2020 @08:03AM (#23562247)
Maybe we would still have had a ceiling, it just would have been later at 15MB or so instead of 640KB.
Re:A look at the die of the 8086 processor by chihuahua on Wednesday June 17, 2020 @03:52PM (#23555928)
I wish Intel had just added some address lines and increased the price by $10 or whatever.

I remember writing 68k assembly code and it was very pleasant to work with. 8 address registers, 8 data registers, if you want to access memory, you just put a 32-bit address into an address register.

Then I read a book about 80286 assembly and though "ugh this is horrible" and never wrote a single line of x86 assembly code. Worrying about segments and memory models (tiny, small, medium, compact, large, huge) seemed like such a drag on programmer productivity.

Re:A look at the die of the 8086 processor by a1369209993 on Wednesday June 17, 2020 @06:36PM (#23557622)
It's not a matter of address lines; registers are 16-bit (can addresss only 64 kilobytes), so you need segmentation regardless of whether your segements are mapped into 1MB, 16MB, or 4GB. (For Abus = Areg + Sreg << 4, 8, or 16 respectively.)
Re:A look at the die of the 8086 processor by ibiza on Thursday June 18, 2020 @01:03AM (#23559946)
Motorola jumped from their 8-bit 6809 to a full 32-bit (internal) processor in 1979. Intel delivered a 32-bit processor 6 years later in 1985.

        Intel          Motorola
  1974  8080   8-bit
  1974                 6800   8-bit
  1976  8085   8-bit
  1978                 6809   8-bit
  1978  8086  16-bit
  1979                 68000 32-bit
  1982  80286 16-bit
  1985  80386 32-bit
Re:A look at the die of the 8086 processor by a1369209993 on Thursday June 18, 2020 @02:00AM (#23560205)
Yes, but that's not a matter of "just add[ing] some address lines"; it's a matter of adding additional bits to the registers (and probably the ALU and internal data buses, but the registers are the limiting factor: if you don't have 32-bit registers you can't have (32-bit) flat address space). Even if it were "just", it would be "just add some register bits".
Re:A look at the die of the 8086 processor by microcolonel on Wednesday June 17, 2020 @04:11PM (#23556136)
> I wish Intel had just added some address lines and increased the price by $10 or whatever.

It was at a magic price point though, ten dollars literally could have broken the whole product.

Re:A look at the die of the 8086 processor by kabdib on Wednesday June 17, 2020 @04:30PM (#23556358)
It probably would have tipped IBM over to using the 68K. IIRC it was a near thing anyway.
Re:A look at the die of the 8086 processor by AnimalMuppet on Wednesday June 17, 2020 @05:17PM (#23556885)
I have heard that IBM chose the 8088 because Intel sowed some FUD about Motorola's ability to supply the 68000 in sufficient quantity for IBM. The decades of insanity we could have saved if IBM had chosen differently...
Re:A look at the die of the 8086 processor by pwg on Wednesday June 17, 2020 @09:16PM (#23558772)
The Wikipedia page on AMD has a slightly different take (https://en.wikipedia.org/wiki/Amd#Technology_exchange_agreem...):

-quote-

Technology exchange agreement with Intel

Intel had introduced the first x86 microprocessors in 1978. In 1981, IBM created its PC, and wanted Intel's x86 processors, but only under the condition that Intel also provide a second-source manufacturer for its patented x86 microprocessors. Intel and AMD entered into a 10-year technology exchange agreement, first signed in October 1981 and formally executed in February 1982. The terms of the agreement were that each company could acquire the right to become a second-source manufacturer of semiconductor products developed by the other; that is, each party could "earn" the right to manufacture and sell a product developed by the other, if agreed to, by exchanging the manufacturing rights to a product of equivalent technical complexity. The technical information and licenses needed to make and sell a part would be exchanged for a royalty to the developing company. The 1982 agreement also extended the 1976 AMD–Intel cross-licensing agreement through 1995. The agreement included the right to invoke arbitration of disagreements, and after five years the right of either party to end the agreement with one year's notice. The main result of the 1982 agreement was that AMD became a second-source manufacturer of Intel's x86 microprocessors and related chips, and Intel provided AMD with database tapes for its 8086, 80186, and 80286 chips.

-end quote-

How much really was Intel sowing FUD vs. IBM demanding a second source be available is probably lost to time.

Re:A look at the die of the 8086 processor by Gibbon1 on Wednesday June 17, 2020 @10:59PM (#23559369)
The explanation I read back in the early 80's was Intel had the 8088 which required 8 DRAM chips. And the 68000 required 16 DRAM chips. For early microcomputers the cost of DRAM was the dominant cost.
Re:A look at the die of the 8086 processor by csharptwdec19 on Thursday June 18, 2020 @06:36PM (#23568913)
Interesting point. I know that with the Nintendo 64, the use of RDRAM was similar (lower overall chip count, which also helped with board cost in that case)
Re:A look at the die of the 8086 processor by Gibbon1 on Thursday June 18, 2020 @08:57PM (#23569907)
I think also a narrower data bus which might allow a smaller PCB with fewer layers. Used to be higher layer count PCB's $$$$.

Friend worked on a layout where they did the board design first and then designed the processor pinout to match. So they could get away with a small two layer board. Ground on the bottom layer and all the signals on the top layer.

Re:A look at the die of the 8086 processor by fortran77 on Wednesday June 17, 2020 @11:42PM (#23559598)
Decades of insanity? We've had decades of high-performance, low cost computing with three major OS choices (OSX, Windows, Linux) on the x86 platform.
Re:A look at the die of the 8086 processor by AnimalMuppet on Thursday June 18, 2020 @12:03PM (#23564402)
And before that, we had decades of insanity. Segmentation. Six different memory models. Extended memory managers. Extended vs. expanded memory. Those needless complications burned tons of person-years of developer time that could have been spent on useful things.
Re:A look at the die of the 8086 processor by fortran77 on Thursday June 18, 2020 @09:48PM (#23570202)
Ha! I almost forgot about having to choose a memory model when writing a program.
Re:A look at the die of the 8086 processor by bbojan on Wednesday June 17, 2020 @10:12PM (#23559104)
I've heard a story that due to the hardware divide instruction in 68000, IBM engineers were concerned about interrupt latency (the instruction took many cycles to execute and couldn't be pre-empted by in interrupt).
Re:A look at the die of the 8086 processor by SomeoneFromCA on Thursday June 18, 2020 @07:22AM (#23562003)
8086 also had hardware div.
Re:A look at the die of the 8086 processor by pkaye on Wednesday June 17, 2020 @04:44PM (#23556499)
I think the idea of the segment registers is to create isolated memory ranges for multi tasking. These segments are at the granularity of 16 bytes and have a starting offset and length within 1MB of RAM. There are multiple segments so the code segment can be shared between processes and have separate stack and data segments. When you imagine it as one big 1MB address space this memory model looks wierd.
Re:A look at the die of the 8086 processor by kiwidrew on Wednesday June 17, 2020 @10:00PM (#23559011)
What the segment registers actually allowed was a primitive form of relocatable code: the 8086 didn't have PC-relative addressing modes, so instead what you got was 16-bit absolute addressing that was segment-relative. DOS could load .COM files (which had a 64KB limit and used the "tiny" model where all the segment registers point to the same 64KB region of memory) at any offset in conventional memory without needing to perform any runtime relocation. Combined with the lack of any header this made perfect sense for small utilities that needed to execute quickly.
Re:A look at the die of the 8086 processor by hyperman1 on Thursday June 18, 2020 @07:41AM (#23562105)
I've never bothered to check this, but recently I was told that COM files could be >64K. The DOS loader would just keep loading data until the real 640K end of memory was reached. The program itself would be responsible to modify segment register to gain access to the unreachable parts of itself.

It seems technologically possible, as a program could always assume memory above its own segment (up to A000 of course) was free.

Can anyone conform or deny?

Re:A look at the die of the 8086 processor by jart on Thursday June 18, 2020 @08:37AM (#23562486)
I can't speak for DOS support but I love building COM binaries on Linux which exceed 64k thanks to SFX which allows us to respect the GPL with source code bundling.

https://raw.githubusercontent.com/jart/cosmopolitan/master/a...

Re:A look at the die of the 8086 processor by andrewf on Wednesday June 17, 2020 @05:21PM (#23556930)
Intel leaned into this with the 286's protected mode - segments became references to "selectors" so the OS could place your 64k chunks of code/data wherever it wanted within 16M.

I think the existing base of 8080 software (including CP/M software) was on their minds. You see the same thing in the 386/486, they have the large flat virtual address space software devs wanted, but until the early 90s their commercial value was running 8088 software really fast.

Re:A look at the die of the 8086 processor by pwg on Wednesday June 17, 2020 @09:27PM (#23558825)
>I think the existing base of 8080 software (including CP/M software) was on their minds.

This is the generally accepted history. According to what's in Wikipedia (https://en.wikipedia.org/wiki/Intel_8086#The_first_x86_desig...) the design was developed very quickly, and intentionally built as a straightforward 'extension' of the 8080/8085 chips into the 16-bit world:

-quote-

The first x86 design

The 8086 project started in May 1976 and was originally intended as a temporary substitute for the ambitious and delayed iAPX 432 project. ... Both the architecture and the physical chip were therefore developed rather quickly by a small group of people, and using the same basic microarchitecture elements and physical implementation techniques as employed for the slightly older 8085 (and for which the 8086 also would function as a continuation).

Marketed as source compatible, the 8086 was designed to allow assembly language for the 8008, 8080, or 8085 to be automatically converted into equivalent (suboptimal) 8086 source code, with little or no hand-editing. The programming model and instruction set is (loosely) based on the 8080 in order to make this possible. However, the 8086 design was expanded to support full 16-bit processing, instead of the fairly limited 16-bit capabilities of the 8080 and 8085.

-end quote-

Re:A look at the die of the 8086 processor by WalterBright on Wednesday June 17, 2020 @06:24PM (#23557531)
You grow to love it, though, sort of like Stockholm Syndrome.
Re:A look at the die of the 8086 processor by mrlonglong on Wednesday June 17, 2020 @07:54PM (#23558252)
I liked being able to compile tightest code to fit the appropriate memory model. Tiny was a favourite with all segment registers pointing to the same segment. Another favourite was the huge memory model, multiple code, data and stack segments. Until the day came when one couldn't fit anymore in. I was glad when the mighty 386 came along.
Re:A look at the die of the 8086 processor by WalterBright on Wednesday June 17, 2020 @08:03PM (#23558314)
It turns out that it wasn't actually necessary for a COM file to have the segment registers all the same. The Zortech COM file generation only required that the COM file be less than 64K. The startup code would fix things up so it would load and run.
Re:A look at the die of the 8086 processor by Koshkin on Wednesday June 17, 2020 @07:05PM (#23557886)
Isn't all love like that.
Re:A look at the die of the 8086 processor by mschaef on Thursday June 18, 2020 @09:23AM (#23562845)
Intel was trying to maintain backward compatibility, so the segments made sense. (They let you default to using the same 16-bit pointers as the earlier 8-bit CPU's, and only use the extended capability if you explicitly opted in by adjusting segment registers and the like.)

And given the cost of memory and CPU packaging pins, 20-bite probably didn't seem like too much of a loss compared to 24-bit addressing (or Motorola's internal 32-bit).