Question

In: Physics

Draw the figure for memory segments with 8086 microprocessor software model. Explain the logical address structure...

Draw the figure for memory segments with 8086 microprocessor software model. Explain the logical address structure used for each segment (Explain which registers are used in logical address presentation of each segment; segment address : offset address).

Solutions

Expert Solution

Memory Segmentation in 8086 Microprocessor

Prerequisite – Segmentation

Segmentation is the process in which the main memory of the computer is logically divided into different segments and each segment has its own base address. It is basically used to enhance the speed of execution of the computer system so that the processor is able to fetch and execute the data from the memory easily and fast.

Need for Segmentation –

The Bus Interface Unit (BIU) contains four 16 bit special purpose registers (mentioned below) called as Segment Registers.

Code segment register (CS): is used for addressing memory location in the code segment of the memory, where the executable program is stored.

Data segment register (DS): points to the data segment of the memory where the data is stored.

Extra Segment Register (ES): also refers to a segment in the memory which is another data segment in the memory.

Stack Segment Register (SS): is used for addressing stack segment of the memory. The stack segment is that segment of memory which is used to store stack data.

The number of address lines in 8086 is 20, 8086 BIU will send 20bit address, so as to access one of the 1MB memory locations. The four-segment registers actually contain the upper 16 bits of the starting addresses of the four memory segments of 64 KB each with which the 8086 is working at that instant of time. A segment is a logical unit of memory that may be up to 64 kilobytes long. Each segment is made up of contiguous memory locations. It is an independent, separately addressable unit. Starting address will always be changing. It will not be fixed.

Note that the 8086 does not work the whole 1MB memory at any given time. However, it works only with four 64KB segments within the whole 1MB memory.

Below is the one way of positioning four 64 kilobyte segments within the 1M byte memory space of an 8086

Types Of Segmentation –

Overlapping Segment – A segment starts at a particular address and its maximum size can go up to 64kilobytes. But if another segment starts along with this 64kilobytes location of the first segment, then the two are said to be Overlapping Segment.

Non-Overlapped Segment – A segment starts at a particular address and its maximum size can go up to 64kilobytes. But if another segment starts before this 64kilobytes location of the first segment, then the two segments are said to be Non-Overlapped Segment.

Rules of Segmentation Segmentation process follows some rules as follows:

The starting address of a segment should be such that it can be evenly divided by 16.

The minimum size of a segment can be 16 bytes and the maximum can be 64 kB.

Advantages of the Segmentation The main advantages of segmentation are as follows:

It provides a powerful memory management mechanism.

Data related or stack related operations can be performed in different segments.

Code related operation can be done in separate code segments.

It allows to processes to easily share data.

It allows to extend the address ability of the processor, i.e. segmentation allows the use of 16-bit registers to give an addressing capability of 1 Megabyte. Without segmentation, it would require 20-bit registers.

It is possible to enhance the memory size of code data or stack segments beyond 64 KB by allotting more than one segment for each area.

logical address structure  

The logical address is also known as a Virtual address. An address generated by the CPU which is added with the base address to form the physical address is called a logical address.

The operating system or some other programs uses base addresses as a measure to find addresses. Here base address means starting address of a memory block.

According to program written CPU generates an address, that address is added with the base address so that it forms Logical Address.

In an operating system, An address generated by the CPU is called a Logical Address. It corresponds to a location in Logical memory.

Segment Address :

A segmented address is a 4-digit hexadecimal address which points to the start of a 64 kB chunk of data. The offset is also a 4-digit hexadecimal address which defines the address offset from the segment base pointer.

This is illustrated in Figure

The segment: offset address is defined as the logical address, the actual physical address is calculated by shifting the segment address 4 bits to the left and adding the offset

Offset address :

The offset address in an 8086 is the logical address that the program "thinks about" when it addresses a location in memory. The Execution Unit (EU or CPU) is responsible for generating the offset address. The Bus Interface Unit (BIU), on the other hand, takes the offset address and adds it to four times the selected segment register value in order to determine a real address, which is now 20-bits in length.

Some programs do deal with segment addresses as well - these are called far pointers instead of near pointers - but the program has to do more than one step to load both the offset and the segment address - a complexity created by running in a 16-bit environment


Related Solutions

Design a 8086 microprocessor base system that manage 1Mbyte of memory and can handle serial and...
Design a 8086 microprocessor base system that manage 1Mbyte of memory and can handle serial and parallel communication, a keyboard, a screen, a printer and a USB connection that handle high capacity secondary memory. Show all the connections needed and use all the necessary family chips needed to handle the I/O Systems. Show the memory map needed and the necessary I/O drivers. Use an interrupt manage chip to handle the I/O devices to be connected.
Draw diagram showing 8088 microprocessor connected to 4 memory chips each of 32K, mapped to memory...
Draw diagram showing 8088 microprocessor connected to 4 memory chips each of 32K, mapped to memory address starting from D0000.
What is the “logical malleability” of software as both a product and a service? Explain at...
What is the “logical malleability” of software as both a product and a service? Explain at least four “conceptual muddles” this state of affairs creates for upholding ethical frameworks. Include three specific cases and examples from the book or recent current events
Draw a concept map that connects the following physics phenomena into a logical structure: Electric fields...
Draw a concept map that connects the following physics phenomena into a logical structure: Electric fields Magnetic fields Electric currents Permanent magnets Light The electromagnetic spectrum Electric charges
Draw Draw a three-graph figure similar to Figure 9.4 in chapter 9 notes and explain the...
Draw Draw a three-graph figure similar to Figure 9.4 in chapter 9 notes and explain the effects of a Chinese tariff on U.S. exports of soybeans to China. Assume that the United States and China are large countries. Do a welfare analysis and explain the effects of the tariff in the U.S. soybean market, do a welfare analysis and explain the effects of tariff in the Chinese market, and explain the effects of the tariff in the international market. Explain...
Figure for Ca2+ dynamics. Draw a model with arrows and #’s in the order “The scheme...
Figure for Ca2+ dynamics. Draw a model with arrows and #’s in the order “The scheme of ionic currents within a cardiac cycle for a mammalian pacemaker cell” The scheme of ionic currents within a cardiac cycle for a mammalian pacemaker cell (i.e., SA node) is generally described with the background [Ca2+]i continually increasing and decreasing. Starting in diastolic depolarization with a slow release of Ca2+ by ryanodine receptors (RyR), from the SR, leads to a rise in [Ca2+]i ....
Explain the logical structure of the following set of propositions - a theory. 1.The set of...
Explain the logical structure of the following set of propositions - a theory. 1.The set of languages accepted (decided) by deterministic Turing machines = the set of languages accepted (decided) by nondeterministic Turing machines 2. PATH belongs to P 3. TAUTOLOGY is a member of coNP 4. 2 definitions for NP (1 in terms of a polynomial verifier 2 in terms of a nTM) are equivalent 5. PSPACE = NPSPACE 6. NP is a subset of PSPACE 7. SAT belongs...
Explain 5-Forces Model. Draw diagram to explain the model.
Explain 5-Forces Model. Draw diagram to explain the model.
Draw and explain the structure of different types of clays
Draw and explain the structure of different types of clays
13. Briefly describe the three-stage model of memory, and explain how the memory stages interact. Also,...
13. Briefly describe the three-stage model of memory, and explain how the memory stages interact. Also, explain how flashbulb memories demonstrate that emotions and memories are interrelated. In your opinion, how does this overlap between emotions and memories contribute to the accuracy of one’s memories?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT