7

This is a question that has been puzzling me for a while.

What happens with devices like graphic cards that have their own memory chips? Do these cards read/write from their own internal memory to/from existing physical memory in the motherboard? Or do CPUs access directly to the card's memory? (in which case no physical memory will be necessary in the motherboard for video, for example)

9
  • 3
    Where makes you believe that they did have that they may have that much, rather than 640KB which would be cheaper and easy enough to achieve?
    – Jules
    Mar 23, 2018 at 12:30
  • 1
    @Jules The fact that you can actually store data and even run code in some places above 640KB, (including display memory) made me wonder about this.
    – Trap
    Mar 23, 2018 at 13:09
  • 1
    As lon as memory is visible in the CPU address space, it doesn't matter if it's on the main board, a memory card or a graphics card. Why should it? It's memory.
    – Raffzahn
    Mar 23, 2018 at 13:32
  • 2
    Why the down votes?
    – cbmeeks
    Mar 23, 2018 at 19:05
  • 3
    @cbmeeks Well some people feel this is an elite club and don't tolerate well those who show a certain degree of ignorance in their questions. That's why :) It's been always the same in SE.
    – Trap
    Mar 23, 2018 at 20:38

3 Answers 3

16

No, there isn’t necessarily 1 MiB of memory on a PC XT or AT’s motherboard. In fact the original PC (5150) only officially supported up to 64 KiB of memory, 256 KiB in later models; the original XT (5160) only supported 256 KiB, later models supported up to 640 KiB. Additional memory could be installed using expansion cards.

Expansion cards, along with the system’s memory controller, sit on the system bus, which includes a number of address lines. When the CPU wants to read from or write to memory, it puts the address it’s interested in on the bus, and asserts the appropriate state using other pins; any interested party on the bus can respond appropriately to handle the read or write.

This means the address space can cover a variety of different hardware. On a typical XT, you’d have up to 640 KiB of real memory, responding to the first 640 KiB’s worth of addresses; then one or two graphics adapters, then expansion cards, then the system ROM. The fact that addresses map to something all the way up to 1 MiB on a standard PC or XT doesn’t mean that it has 1 MiB of physical memory. The AT added memory up to 16 MiB, but it would typically have a hole from 640 KiB to 1 MiB (to leave room for expansion cards and ROM).

See Who decides what is the memory address that the CGA video buffer will be mapped to? for some related information, and Who set the 640K limit? for an explanation of the PC memory map.

3
  • 2
    Erm ... no, (sorry for beeing tight :)) The original 5150 PC only supported (16-)64 KiB on board. Similar the original 5160 XT only supported (64-)256 KiB on board. Everything above had to be placed in with add on cards. Later 5150 where supplied with an upgraded mainboard for 64 Ki Chips makign it 256 KiB max. Similar with 5160 and up to 640KiB. The boards had label (or in etching) of the memory size: 16KB-64KB / 64KB-256KB for the 5150 and 64-256KB / 256-640KB for the 5160. In case of the 256 KiB Board the notation is a hint about being a PC or XT :))
    – Raffzahn
    Mar 23, 2018 at 13:42
  • @StephenKitt Nice answer. So, does this mean that upper memory made available for programs by HIMEM.SYS/EMM386.SYS actually reside in expansion cards or display memory? What about the 1st 64Kbs above 1MiB? where is that supposed to exist?
    – Trap
    Mar 26, 2018 at 1:14
  • 1
    @Trap no. HIMEM.SYS doesn’t add any memory in the UMA itself; EMM386.EXE adds memory in the UMA by remapping extended memory. Other UMA providers such as UMBPCI work by enabling shadow memory; this is also effectively remapped extended memory, handled by the chipset. You can use display memory, but that’s all that’s guaranteed to be usable; anything else in the UMA is normally ROM or the EMS page frame. The HMA, above 1 MiB, is extended memory which is accessible thanks to the 8088’s segmentation model; is also corresponds to real physical memory. Mar 26, 2018 at 4:10
5

Short answer: No.

Long answer: Noooooooooooooooooooooooooooooooooooo. You've made a fundamental misunderstanding about the nature of the early IBM PC hardware, and all those hours of puzzling could have been solved by, well... going back and reading up on it.

The PC and XT mainboards could address a maximum memory range of 1 megabyte, as that's all that the lines coming out of the processor could span. But, the architecture had to allow for various other things in the memory map: a not inconsiderable amount of onboard ROM (the early machines being BASIC-centred, as neither a disk drive nor a DOS could be assume as present), plus any number of expansion cards (the machine was made to be hugely expandable - you could even buy a secondary Expansion Chassis box with a load of extra slots and its own power supply) acting as memory-mapped IO devices, often with their own RAM and ROM that needed access ranges outside of the usual RAM zone.

Initially this was split 50/50, as in 1981 a half megabyte of memory was huge; the base model of the PC came with 16KB, and the deluxe model had 64KB. When power users started demanding even more, and it became clear that 384KB of address range was more than enough to fit in the usual complement of ROM and IO, a revised BIOS was issued that adjusted it to more like 5/3... that is, you could have upto 640KB of RAM without using special banking/paging drivers to access supersized cards. Hence the familiar conventional memory limit of many successive generations of DOS.

No PC/XT therefore has 1MB on the motherboard. 3/8ths of it would be wasted, and at early 80s prices, that's a LOT of money to burn for no reason. It may look like there's two equal banks on some of them, but that's an illusion; one will use more expensive, high density chips to provide 512KB, the other will use cheaper low-density ones (but the same amount, as typically they're arranged as 1-bit wide devices, thus there's 8 in a bank) for the additional 128KB. Others will make it a little more obvious by having three banks; two of 256K and one of 128K. A lot of XTs were sold with 512K on board and the user had to supply the rest.

ATs, it's anyone's guess. A lot were sold with 512K or 640K just because that's what made economic sense in the market segment and was most convenient (no need for extra drivers under DOS or whatever), and some early configurations even had less. But I doubt it would have been uncommon to find later ones with at least a full meg onboard, and/or maybe additional SIMM slots or an EMS/XMS memory card in one of the expansion slots to increase the total amount to 1MB or more with use of HIMEM or other such drivers. They could support more, natively, indeed all the way up to 16MB (though with the typical PC 640-to-1024K memory hole, and another near the top of the expanded range, a max of 15MB was more common), but a fully loaded example would be a fancy machine indeed, and expensive with it. I doubt many ever had more than 2MB, or 4 at most. Either way, just having 1MB on the mainboard would likely have been an uncommon occurrence overall, apart from a certain period, probably just before they started giving way to 386s in great numbers, when that became a briefly common standard setup.

(I actually have a 286... with 640K on the mainboard, and two SIMM slots. Populated with the only valid configuration, it's still not "one meg" - instead, it's 1152KB)

As for the video cards, etc... yeah, their onboard memory had to fit into the overall system map, but it didn't become a true part of it. You couldn't load programs into it and execute from there, as far as I'm aware. Though I'll admit a little confusion on that front myself, as ROMs that sit in the over-640KB region are entirely executable without being "shadowed" into main RAM, so, maybe? I don't think many people have tried it as a realistic thing, though, because by the point graphics cards started coming with a large enough amount of memory to make that a worthwhile tactic (and started pushing the boundaries of what would fit in the IO zone) - namely, enough to allow multiple logical graphics pages, so you could write data into a part of the adapter that wouldn't immediately show up on-screen, and pull off tricks like double buffering - actual system memory had also expanded quite considerably and it wouldn't have given quite the same boost as before. Plus reading anything over the expansion bus was pretty dang slow, hence the common tactic of "shadowing" ROM for faster execution. Plus any card with more than 64KB - e.g. VGAs, or EGAs with more than the basic, somewhat crippled memory count - didn't expose all their memory in one go, and instead had paged access via 64KB blocks and a page register, to avoid overloading the available address space (especially crucial with the PGC, XGA and other expanded-VGA cards that had 320, 384, 512KB or more...)

5
  • OK. Who's following me round here and immediately downvoting anything I write regardless of what it is, and before they could possibly have read all of it? Show yourself, coward.
    – tahrey
    Oct 27, 2019 at 23:14
  • 1
    I don’t know who it is, but I do have a couple of minor quibbles with your answer (not relevant to the main question): 286s with a megabyte onboard were fairly common even early on (I still have two motherboards with a megabyte of chips, not SIMMs, from 1985); and using the video address space or even video memory as conventional memory was doable, albeit not that common (DR DOS supported it, as did various memory management tools such as QRAM/VIDRAM). Oct 27, 2019 at 23:39
  • For some reason I can't see vote history against your user right now. Will check it again later but voting patterns like that often get flagged automatically and sometimes they're automatically reversed too. If you keep seeing it please let me know!
    – Matt Lacey
    Oct 27, 2019 at 23:42
  • Are you sure about the 50/50 split? The IBM PC technical reference allowed for 640K of RAM in 1981. Oct 28, 2019 at 11:44
  • At least one 8086 (not 8088) based PC compatible (Toshiba T1200) was fitted with 1MiB ... Nov 2, 2021 at 12:19
3

It is also a question of mother board BIOS as some areas are remapped by ROM/RAM memories of installed devices. Some motherboards can use the overlapped memory areas. For example you know the Shadow memory options in old BIOS SETUPs.

The native MS-DOS (real mode) see only the 1 MiB space but you can configure some areas to page in/out different areas of memory. This is how VGA paging works. The same goes for XMS/EMS with which you can access even more than 1MiB of memory if present in system.

So the main access route in real mode MS-DOS was to use specific memory range (usually 64 KiByte) and map part of normally not accessible memory into it. When you done with its use page in another part of memory and so on ...

How ever in MS-DOS you could switch to protected mode and have 32bit meory space available directly. But its a matter of perspective if you can consider such program still a MS-DOS as you virtually turn it of and use your own OS like code.

3
  • VGA paging (bank-switching) is dealt with by the VGA chipset itself, the (system) BIOS isn’t involved. The paging access you describe for DOS is EMS: a 64K area is reserved in the UMA, either by an expansion card or chipset providing EMS, or by a driver remapping memory, and the EMS services are used to page memory in and out of that area. Mar 26, 2018 at 15:04
  • @StephenKitt you mis understood MB BIOS can configure on-board memory to shadow predefined (usually) ROM areas and or use that part of memory for different purposes (has nothing to do with EMS/XMS/UMB nor paging but can affect the amount of usable memory), VGA paging is done the card itself and its BIOS (but that on board of VGA they got one too) but I never mention BIOS with VGA paging nor paging at all to make it clearer I should divide the things by empty line (done now)....
    – Spektre
    Mar 29, 2018 at 6:28
  • 1
    I know what shadow RAM is ;-). My comment didn’t mention shadow RAM... You write “you can configure some areas to page in/out different areas of memory. This is how VGA paging works”, which gives the impression VGA uses some general paging mechanism; that’s what my first comment was about. My EMS comment concerned your third paragraph which basically describes EMS; I just thought it worth pointing out. Mar 29, 2018 at 14:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .