PowerPoint PresentationProblemPositional Notation (Hex Digits)Problem ContinuedSlide 5Segment Register DefaultsSegments/ SegmentationLogical AddressesDetermining the Physical Address from a Logical AddressReal-Mode AddessingSlide 11Memory BanksMemory Chip Organization1/2002 JNM 1With 20 bits, 1,048,576 different combinations are available. Each memory location is assigned a different combination. Each memory location is 1-byte wide. Therefore, the memory space of the 8086 consists of 1,048,576 bytes or 524,288 16-bit words. The 8086 has a 20-bit Address Bus1/2002 JNM 2Problem•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 digits1/2002 JNM 3Positional Notation (Hex Digits)1/2002 JNM 4Problem 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 64k1/2002 JNM 5Within the 1 MB of memory, the 8086 defines 4 64KB memory blocks.Segmented Memory7FFFFThe segment registers point to location 0 of each segment. (The base address)DS: E000 CS: B300SS: 7000 ES: 5D271/2002 JNM 6Segment Register Defaults1/2002 JNM 7Segments/ 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).1/2002 JNM 8Logical 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.1/2002 JNM 9Determining 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 3DA2Ch1/2002 JNM 10Real-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)1/2002 JNM 11Memory Map for an 80x86 computer running MS-DOS1/2002 JNM 12Memory Banks•Even though the 8086 has a 16-bit data bus, it is byte addressable.•Memory is divided into two 8-bit banksBE0BE1Even Addresses Odd Addresses1/2002 JNM 13Memory 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
View Full Document