At 06:59 PM 6/20/02 +0100, Virginia Da Costa wrote the following: >I need urgent help on a question, deadline TOMORROW UK time, and although it >may not be of general interest to the list, I'm sure there are many of you >who will know the answers. > >The question is this: >[quote] >The main memory of a microprocessor system consists of the following mmemory >sections: > >512K ROM >256 video RAM >128K general-purpose RAM >128K special battery-backed, non-volatile RAM > >Assume the above sections of memory are located contiguously in the order >given above (i.e. the start of the ROM is at address 0, the start of the >video RAM follows on directly from the end of the ROM and so on) and that >the memory sections completely fill the microprocessor's main memory address >space. > >(a) How many address lines do the following sections of memory need? >(i) the ROM >(ii) the general-purpose RAM > >(b) How many address lines does the microprocessor have? >[unquote] > >I've worked out, I hope correctly, that the address blocks are as follows: >ROM 00000h to 7FFFFh >Video RAM 80000h to BFFFFh >Gen. purpose RAM - C0000h to DFFFFh >non-volatile RAM - E0000h to FFFFFh > >Having spent hours researching the question on the internet (there's no-one >to help as I'm doing a distance-learning course and get no feedback at >all) -- I found so much conflicting information on address lines and how to >calculate memory amounts that I am more confused than ever. There seem to be >different figures and methods of calculation depending on whether one is >talking about real-mode, protected-mode, or the memory chips themselves. In >fact, what is understood by address lines? the number of lines on the >address bus or the number of linear locations in memory?? Or ...? > >Is it correct that 1M of memory needs 20 address lines?? How does one go >about calculating the lines required by the different sections of memory. >The answer is probably simple but I've become so confused that I can't get >my head round it.
Once upon a time when IBM decided to build a PC the only chip available at the time was an Intel 8086. This microprocessor could address 1MB of memory. This was done with what is called segmented architecture. That is, a 16-bit segment register (2 to the 16 is 65536 or hexadecimal FFFF) and a 16-bit offset contained in an index register. Effectively, you had a 32-bit address space which could be used to address 4,294,967,296 (4GB!) separate memory locations. But with the segment-offset method (0000:0000 to FFFF:FFFF) employed by Intel you really only have 1MB on the 8086 (8-bit registers), 16Mb on the 80286 (16-bit registers) and 4 GB on the 80386 and above (32-bit registers). The segment-offset method uses a 20-bit addressing scheme instead of the 32-bit you might expect. The segment register value is multiplied by 16 and added to the displacement (or offset) value in the index register. Hence, there are many duplicate addresses. i.e., 1000:0345 is the same as 1004:0305. Pentium processors and Windows 95 and above use a flat memory model. That is, all memory is available to an application (no 640KB boundary unless using a protected-mode DOS program). The Intel 8086 processor was chosen as the microprocessor for the IBM PC but a decision had to be made in how to allocate the 1MB addressable memory of the chip. It was decided by IBM to allow DOS to run in the conventional memory area and to occupy the bottom 640KB of the 1MB. The 640KB was divided into three zones: the interrupt vector table (00000H to 00400H or 1KB); the operating system area (varies); and the transient program area (up to A0000H or 640KB). The memory space above 640KB was partitioned among ROM chips on the system board and among RAM and ROM chips on expansion boards. This was the basis of Expanded Memory Systems (EMS), and Expanded Memory Management (EMM) systems. Extended memory is storage above 1MB that can be accessed by 80x86 microprocessors running in protected mode (i.e., protects against misuse of memory that might overwrite the base 640KB). FYI, protected-mode is the 640KB area, and real-mode is anything above 1MB. PC-DOS also reserved some other areas of the 640KB to 1MB address space: Base Address Size Description A000:0000H 64KB EGA video buffer B000:0000H 4KB Monochrome video buffer B800:0000H 16KB Color/graphics video buffer C800:0000H 16KB Fixed-disk ROM F000:0000H 64KB PC ROM BIOS and ROM Basic -- Gerry Boyd ============= PCWorks Mailing List ================= Don't see your post? Check our posting guidelines & make sure you've followed proper posting procedures, http://pcworkers.com/rules.htm Contact list owner <[EMAIL PROTECTED]> Unsubscribing and other changes: http://pcworkers.com =====================================================
