EE 3750 โ HW 1 solutions 1
EE 3750 โ Homework 1 solutions
Fall 2009
1. (a) Let the effective address of variable blue be 42EH and let DS = 2A50H. What is
the corresponding physical address of blue, assuming real mode operation?
(b) Let the physical address of variable gold be 9B491H and let the effective address of
gold be 2171H. What are the corresponding contents of DS, assuming real mode operation?
(c) Assume protected mode operation. Let the effective address of variable tan be 2E04H
and let the base value in the descriptor to which DS points be 67C000H. What is the
corresponding physical address of tan?
All values are given in hex.
(a) DS shifted by 4 bits = 2A500
EA = + 42E
PA = 2A92E
(b) PA = 9B491
EA = โ 2171
DS shifted by 4 bits = 99320
DS = 9932
(c) base address = 67C000
EA = + 2E04
PA = 67EE04
2. Explain the sequence of operations performed by the 8086 while executing the
instruction ADD CH, [BX+DI]. (Be sure to include generation of effective and physical
memory address and what happens to both the source and destination operands.)
The 8086 calculates the 16-bit effective address of the source, [BX+DI], by adding the
contents of BX and the contents of DI, then passes this to the bus interface unit (BIU). The BIU
shifts the contents of DS to the left by 4 bits then adds it to the effective address to produce the
20-bit physical address. (DS is the default segment register for this addressing mode.) The 8086
places this physical address on the address bus and signals memory to perform a read. The
memory copies the byte in memory from the location indicated by the physical address to the
data bus. The 8086 takes this value from the data bus and adds it to the contents of register CH.
It then stores the sum in register CH and updates the flags.