Wow.... I remember writing 8086 assembly on MASM and another assembler I've forgotten the name of, and then also doing inline ASM in Turbo C++ The segment thing and the convoluted different pointer math caused real gymnastics if you ever had data bigger than 64k... such as images. I always thought of the segments as windows of 64k but moving between those windows, esp with the limited register set, required some real…
8086 Segmented Memory was a good idea
121–130 of 150 posts
Re: 8086 Segmented Memory was a good idea
#122Earlier quoted context omitted.
I think you are missing the entire point of the article (which I kinda agree with), and just repeating the popular wisdom. In the era a machine with "object addressing" sounded like a perfectly valid futuristic design (what a Lisp machine strived to be; I guess today you would call it tagged memory of some kind). The 8086 is not that, but the original design would have allowed to evolve it into something like that. T…
But with only four segment registers, you couldn't treat it as that - not unless you only had four objects. So treating it as a sliding window was all you actually could do with it.
Re: 8086 Segmented Memory was a good idea
#123Earlier quoted context omitted.
Indeed, I say as much at the end. But what should Intel have done? They needed a CPU that can run 8080 code but with more memory. Also it's the year ~1980 and we're limited to the technology of the age. A system with 64k sized windows seems unavoidable. If you extend the size of the address registers, 8080 code will only run in the first 64k, or require some kind of current window register. An 8080 mode might have wo…
> Also it's the year ~1980 and we're limited to the technology of the age. Tbf the Motorola 68000 which was released around the same time (1979) had a proper linear address space with 32-bit address registers (of which 24 bits were wired up). Also the 8086 was intended as a cheap and temporary stop gap until Intel's "proper" 32-bit CPU architecture was ready for prime time (the doomed iAPX 432).
Re: 8086 Segmented Memory was a good idea
#124Re: 8086 Segmented Memory was a good idea
#125Re: 8086 Segmented Memory was a good idea
#126Earlier quoted context omitted.
Probably talking about swapping it in from some external datastore. These days you would open the file and dump it into a single buffer and rip across it, and not even really stress about it. Even 256 meg of hard drive. That would have been impressively expensive in the 80s. Back then you had to chunk it out and fiddle with the offsets. Even then you still would have had to manage loading out the next chunk. If my me…
> Even 256 meg of hard drive. That would have been impressively expensive in the 80s. I only have a couple reference points around this scale: My dad's company had a system set up with a searchable index of a bunch of legal testimony. It was a Compaq Deskpro 386 running Unix with an attached 1GB disk. The 1GB disk set up was as big as the machine itself. A few years later, I worked with a Cyber mainframe equipped wit…
Re: 8086 Segmented Memory was a good idea
#127Earlier quoted context omitted.
> As a person who's been participating in human-to-human communication your entire life, you probably have a pretty well-developed sense of how to structure the flow of a piece of communication. Not OP, but this is where you're wrong. The vast majority of people, myself included, have difficulty structuring communication for effectiveness to a wide audience. When I manage to pull it off I'm very proud of the work, bu…
He's not writing the bible. He's writing a blog post about segment registers. It's fine if there's a sharp edge here or there. You're probably better at communication than you think, and your readers are probably less picky than you're imagining. An occasional sharp edge in your text is not the end of the world.
Re: 8086 Segmented Memory was a good idea
#128Earlier quoted context omitted.
Thanks for responding. The problem is: - the “make it flow” made it flow in an AI generated way like short paragraphs that are one short sentence. - I now have to decide if this is entirely AI generated and thus not worth my time reading or not. - I would prefer to just interact with you as a real person; your writing doesn’t have to be perfect for what you write to be worth reading.
shrug I've reviewed what I originally wrote and I prefer the text I published. Sure, I could review it all myself (indeed I used to) but that takes time and it was becoming a barrier to actually publishing stuff. Maybe I'd have got around to finishing it in a few months. I don't use AI to write for me. I hate people who do that.
Re: 8086 Segmented Memory was a good idea
#129Earlier quoted context omitted.
I'm sure a modern compiler would have no problem with it, but in 1980 optimizer technology wasn't there yet. Modern compilers use more memory that engineers would dare dream of in 1980. By having no problem I mean we know enough about writing an optimizer to write such a thing. I don't think any compiler does, just that they could.
Compilers in 1980 generated 64k code segments and had no other memory model. Most people wrote assembler particularly if they wanted to use more then 64k. Most non assembly programs were interpreted oddly enough and most such interpreters were also mostly 64k.
Re: 8086 Segmented Memory was a good idea
#130Could have been fixed with an ADC-type instruction that operated on segments. Imagine if you could have done something like this: add si, some-delta adsc es, 0 in order to move a seg:ofs ptr forward by 'some-delta' bytes. ADSC (add with segment carry) would do: segreg := segreg + imm + 1000h (if carry) or: segreg := segreg + imm (no carry) Maybe there should also have been an instruction to normalize a seg:ofs ptr (s…