• Please review our updated Terms and Rules here

Pc Ram

evildragon

Veteran Member
Joined
May 29, 2007
Messages
1,646
Location
Tampa Florida
Lately I've been learning about CPU's and addressable memory, and something doesn't add up, on the PC side of things.

8086. It's a 16-bit CPU, and uses 16-bits to access RAM. But, how? From my math, it shouldn't be possible.

2 to the 16th power is 64KB RAM. So how is it accessed then? Bank switching?
 
It uses two registers to form a memory address. It's called segmentation.

But it does so in a rather funny way.
It uses one register to specify what segment of memory it should use and then uses the other register as an offset from that.

And in this equation a segment is 256 bytes. So it can adress 2^24 bytes of memory.

// Z
 
It uses two registers to form a memory address. It's called segmentation.

But it does so in a rather funny way.
It uses one register to specify what segment of memory it should use and then uses the other register as an offset from that.

And in this equation a segment is 256 bytes. So it can adress 2^24 bytes of memory.

// Z
So then it could then address 16MB of memory? Why didn't IBM do that, or is that what expanded memory cards are for? (But that would be 8-bit then, very slow, instead of 16-bit).

Wait, external line is 20-bits. So then that makes 1MB RAM the limit.??
 
Last edited:
Ok.

So why did IBM ever only allow it to access 640KB? Was there a purpose for this limit? I hope it wasn't Bill Gates quote of us never needing more than 640KB.
 
This is basic knowledge that you can find in any 8088/8086 assembly language programming book or text book. I'd suggest a trip to the library rather than trying to recreate all of the relevant info here.
 
This is basic knowledge that you can find in any 8088/8086 assembly language programming book or text book. I'd suggest a trip to the library rather than trying to recreate all of the relevant info here.
Sorry, libraries earliest is Pentium Pro.. And it's not basic knowledge to a basic consumer.

Loosen up dude.
 
Last edited:
I don't think I need to loosen up - I think that you need to learn to use google for some basic searching. Try these keywords: "intel 8088 addressing segments"

Go do some homework and not expect everybody else to spoonfeed you. If you have questions after doing the basic research, then ask.

I don't think that is unreasonable.
 
I don't think I need to loosen up - I think that you need to learn to use google for some basic searching. Try these keywords: "intel 8088 addressing segments"

Go do some homework and not expect everybody else to spoonfeed you. If you have questions after doing the basic research, then ask.

I don't think that is unreasonable.
I did my research, and before I looked harder, I thought the CPU was 16-bit address lines, before finding out it was 20 bits later. Thus, if it was 16-bit, it would concern me, hence I ask. Now that I learn it was 20 bits, 1MB RAM, but I still don't understand why the memory hole problem. And I can't find a sure answer, thus I'm asking.

Now, either be helpful into actually answering my problem, or just leave the thread alone.
 
Now, either be helpful into actually answering my problem, or just leave the thread alone.

A normal person asks where to find a good tutorial or what book to find. You just start posting your questions without any basic research. The thread shows that. All we're asking you to do is to do some homework first.

Nice attitude overall .. you'll go far like that.
 
Glad you like my attitude.

I'm going to just end it here. I'm leaving this forum, and will only be here for when a classified comes up that I might want. Otherwise, I'm gone.

Thanks to those that did help me though.
 
Actually, I'm sorry to see you go, but giving you some google search terms and letting you know that this is basic info available in lots of books really should not have set you off.

We'll be here when you need us.
 
Actually, I'm sorry to see you go, but giving you some google search terms and letting you know that this is basic info available in lots of books really should not have set you off.

We'll be here when you need us.
It set me off because I did research to the extent I could. Google and it's personalized search doesn't bring me the results I want anymore.

By what I DID research, it was a 16-bit address, thus 64KB RAM. I didn't know it was 20-bit, because that was a litle blurb I didn't catch.

I still don' know why there's the 640KB memory hole though. I HAVE tried searching, and can't find it anywhere.
 
Ok, so let's try again.

The 640K limit was arbitrary. Whoever designed the PC said that nobody on earth would need more than 640K of RAM for programs and data. So the upper 384K was reserved for video memory, adapter card BIOS extensions, etc.

The Monochrome video adapter uses 4KB of memory starting at 0xB0000. The CGA card uses 16KB of memory starting at 0xB8000. Hard drive adapters and some network adapters also use memory in the higher regions. Finally, the main BIOS for machine usually starts in 0xF0000 or 0xF8000 depending upon how big it is.

DOS is a simple operating system, and it requires all of the free memory of the machine to be 'contiguous'. So even though there are places in the 384KB where you could plug in RAM, DOS can't use it directly. Hence the need for device drivers to 'load programs' high, and other tricks.

The 80286 just makes things more complicated. 16 times the addressing space, but you have to 'skip' over that 384K hole architected by the machine.
 
Does VGA need this memory at all, since it has it's own RAM on the card? If not, is there a way to just disable that memory mapping (perhaps via a BIOS overlay TSR?), and make it 1 long strand of memory?

My model 25 as I understand it has 768KB of RAM total, as it has 512KB worth of SIMMs, and 256KB worth of DIP's. I noticed in MSD, it's there, it sees it, but just can't accesses, and I figure that since I'm using VGA, there's gotta be a way to get that back, if my theory is right, that no frame buffer memory is required as the VGA card has it's own.
 
So why did IBM ever only allow it to access 640KB?
As far as I understand, it is a DOS limitation. The original IBM PC 5150 came with 16 or 64K, expandable to 256K with IBM's own parts. The IBM XT 5160 can have up to 640K RAM, and according to a Wikipedia entry the other 384K is used for BIOS ROM + VRAM.

On later models with more RAM, you might've heard about Upper Memory Block (UMB) where you could load drivers and parts of DOS.

Certainly, there were 8088 based PC compatibles released all through the 1980's, and at the end of the decade those were beginning to look outdated. Still you can't blame Intel or IBM for limitations in a processor designed in 1978 still in use ten years later.
 
It was not a DOS limitation. It was specified by the people at IBM who designed the PC .. they decreed that 640KB of the 1024KB would be available for programs and data, and that the upper 384KB would be for video adapters, ROM extensions, and the system BIOS. DOS was designed to live within those limits, and on some machines you can find non-standard versions of DOS that can actually use more than 640KB.

All video cards come with their own RAM. That RAM is set to respond to a particular address range in the high 384KB of memory. Back when video cards had 4 or 16KB of memory, all of the video memory could be accessed by the system as normal memory locations.

EGA and VGA can have quite a bit of onboard memory. Imagine a 256KB VGA card .. if it worked like a CGA card, there would be no room in that address map for a hard disk adapter. Higher end video cards (starting with EGA) limit their addressing 'presence' to a subset of what they have available, like 32 or 64K. The rest of the memory has to be accessed through that 'window'.

Wiki has a very good discussion on how VGA uses the memory addresses:

http://en.wikipedia.org/wiki/VGA#Addressing_details
 
Now that the mystery is out of that to me, it's no longer fun trying to hunt it down. XD

Ok, so it has to be there, no way it will come back on this Model 25. Pitty the MCGA and VGA won't work together, sharing the same memory mapping though, for the most part.

dual monitored Model 25 did sound like a cool idea after reading that, before reading that it's MDA with EGA or VGA.
 
Some (IBM-compatible) machines that have 'extra' RAM can use it as a RAMdisk, or sometimes as expanded memory, but you'll need a driver for either. The Zenith SUPERsport 286, with 1Mb of RAM allows the option of using up to 256Kb as expanded, else it goes to waste (it won't see it as extended). Likewise, the Tandy 1400 came with 768Kb, but only allows the use of extra mem for RAMdisk. These are just a couple of examples that come to mind, but there are others.

--T
 
Back
Top