120 likes | 466 Views
1/2002. JNM. 2. Problem. The 8086 has a 20-bit address bus. Therefore, it can access 1,048,576 bytes of memory. How many bits and how many HEX digits are required to access 1M memory?2N = 1M (where N is in bits)N = 20 bits =? 20/4 = 5 HEX digits. 1/2002. JNM. 3. Positional Notation (Hex Digits).
E N D
1. 1/2002 JNM 1
2. 1/2002 JNM 2 Problem The 8086 has a 20-bit address bus. Therefore, it can access 1,048,576 bytes of memory. How many bits and how many HEX digits are required to access 1M memory?
2N = 1M (where N is in bits)
N = 20 bits =? 20/4 = 5 HEX digits
3. 1/2002 JNM 3 Positional Notation (Hex Digits)
4. 1/2002 JNM 4 Problem Continued But each register is only 16 bits (4 HEX digits) wide. How are all of the locations accessed?
Segmented Memory – all of memory is divided into 64-kByte segments. (4 HEX digits (16 bits) can access 64k different locations)
216 ? 64k
5. 1/2002 JNM 5
6. 1/2002 JNM 6 Segment Register Defaults
7. 1/2002 JNM 7 Segments/ Segmentation Segments are variable-sized areas of memory used by a program containing either code or data.
Segmentation provides a way to isolate memory segments from each other. This permits multiple programs to run simultaneously without interfering with each other.
A segment selector is a 16-bit value stored in a segment register.
A logical address is a combination of a segment selector and an offset(16-bit for 8086).
8. 1/2002 JNM 8 Logical Addresses Later in the course, we will get into translation of logical addresses to linear addresses (using descriptor tables and paging).
For now, using a virtual-8086 mode, we can determine the “physical address” by adding the offset to the base. Remember with 8086 mode, there is only 1MB of memory.
9. 1/2002 JNM 9 Determining the Physical Address from a Logical Address Shift the segment value left 4 bits (add a zero to the right), then add the offset
3D7F:023C ? 3DA2Ch
10. 1/2002 JNM 10 Real-Mode Addessing In real mode addressing, the lowest 640K of memory is used by both the operating system and application programs.
Video memory and hardware controllers have reserved memory locations.
C0000h-FFFFFh are reserved for system ROM.
IVT (Interrupt Vector Table) is at first 1024 bytes of memory (00000-03FFFh)
11. 1/2002 JNM 11
12. 1/2002 JNM 12 Memory Banks Even though the 8086 has a 16-bit data bus, it is byte addressable.
Memory is divided into two 8-bit banks
13. 1/2002 JNM 13 Memory Chip Organization Remember that memory chips are usually defined as a k x n device (k=#locations, n=number of cells per location)
Examples
16 x 1 (16M bits)
4M x 4 (4M nibbles)
2M x 8 ( 2M bytes)
1M x 16 (16 M words)
SRAM and ROM are typically arranged x8 (byte wide)