I'm curious to know how to check the RAM size installed on the machine
in x86 assembly language.
In addition, there is a related question in my mind: Must the physical
addresses of the RAM be contiguous? For example, provided that I have
two RAM chips and the size of each is 16M, my PC's mainboard has 3
slots to install RAM chips, let me number them as slot 0, slot 1, and
slot 2. Assuming the addressing hardware numbers the address space
from slot0 through slot2 (i.e. physical address 0 will be allocated to
slot0 if it is equipped with a RAM chip). If I plug the two RAM chips
into slot0 and slot2, and let slot1 empty. In this case, is the first
32M of the physical address space contiguous?
I guess (am not very sure) the addressing hardware will guarantee the
physical address space to be contiguous. For example, if the total RAM
size is 32M, then the physical addresses from 0 to 32M are always
addressable, no matter which slots the RAM chips occupy. Am I correct?
Any help will be highly appreciated. Thanks in advance!


|