written 2.7 years ago by | • modified 2.7 years ago |
Physical address and Logical address
In Intel literature concerning the 8086, there are three types of addresses mentioned frequently: the physical address, the offset address, and the logical address.
• The physical address is the 20-bit address that is actually put on the address pins of the 8086 microprocessor and decoded by the memory interfacing circuitry.
• The offset address is a location within a 64K-byte segment range.
• The logical address consists of a segment value and an offset address.
$\begin{equation} \begin{aligned} &\begin{aligned} &\text { CS } \\ &\begin{array}{|l|l|l|l|} \hline 2 & 5 & 0 & 0 \\ \hline \end{array} \end{aligned}\\ &\begin{aligned} &\text { IP } \\ &\begin{array}{|l|l|l|l|} \hline 9 & 5 & \mathrm{~F} & 3 \\ \hline \end{array} \end{aligned} \end{aligned} \end{equation} $
- Start with CS.
$\begin{array}{|l|l|l|l|} \hline 2 & 5 & 0 & 0 \\ \hline \end{array}$
- Shift left CS.
$\begin{array}{|l|l|l|l|l|} \hline 2 & 5 & 0 & 0 & 0 \\ \hline \end{array}$
- Add IP.
$\begin{array}{|l|l|l|l|l|} \hline 2 & E & 5 & F & 3 \\ \hline \end{array}$
Example 1-1
If $\mathrm{CS}=24 \mathrm{~F} 6 \mathrm{H}$ and $\mathrm{IP}=634 \mathrm{AH}$, show:
(a) The logical address
(b) The offset address and calculate:
(c) The physical address
(d) The lower range
(e) The upper range of the code segment
Solution:
(a) 24F6:634A
(b) $634 \mathrm{~A}$
(c) $2 \mathrm{~B} 2 \mathrm{AA}(24 \mathrm{~F} 60+634 \mathrm{~A})$
(d) $24 \mathrm{~F} 60(24 \mathrm{~F} 60+0000)$
(e) 34F5F (24F60+FFFF)