You are on page 1of 2

# MICROPROCESSOR AND INTERFACING

Q1.

Q2.

Q3.

Q4.

Q5.
Q6.
Q7.
Q8.
Q9.

Q10.
Q11.
Q12.
Q13.
Q14.

## Suppose that DS = 1000H, SS = 2000H, BP = 1000H, and DI = 0100H.

Determine the memory address accessed by each of the following
instructions, assuming real mode operation :
(a) MOV AL, [BP+DI]
(b) MOV CX, [DI]
(c) MOV EDX, [BP]
Suppose that DS = 1200H, BX = 0100H, and SI = 0250H. Determine the
address accessed by each of the following instructions, assuming real
mode operation :
(a) MOV [100H], DL
(b) MOV [SI + 100H], EAX
(c) MOV DL, [BX + 100H]
Suppose that DS = 1100H, BX = 0200H, LIST = 0250H, and SI = 0500H.
Determine the address accessed by each of the following instructions,
assuming real mode operation :
(a) MOV CL, LIST[BX + SI]
(b) MOV CH, [BX + SI]
Select an ADD instruction that will :
If AX = 1001H and DX = 20FFH, list the sum and the contents of each flag
register bit(C, A, S, Z, and O) after the ADD AX, DX instruction executes.
Develop a short sequence of instructions that adds AL, BL, CL, DL, and AH.
Save the sum in the DH register.
Develop a short sequence of instructions that adds AX, BX, CX, DX, and SP.
Save the sum in the DI register.
Select an instruction that adds BX to DX and also adds the contents of the
carry flag (C) to the result.
Select a SUB instruction that will :
(a) Subtract BX from CX
(b) Subtract 0EEH from DH
(c) Subtract DI from SI
(d) Subtract 3322H from EBP
(e) Subtract the data address by SI from CH
If DL = 0F3H and BH = 72H, list the difference after BH subtract from DL,
and show the contents of the flag register bits.
Write a short sequence of instructions that subtracts the numbers in DI, SI,
and BP from the AX register. Store the difference in register BX.
Explain what the SBB[BI-4], DX instruction accomplishes.
Write a short sequence of instructions that divides the number in BL by
the number in CL, and then multiples the result by 2. The final answer
must be a 16-bit number stored in the DX register.
Select an AND instruction that will :
(a) AND BX with DX and save the result in BX
(b) AND 0EAH with DH
(c) AND DI with BP and save the result in DI
(d) AND 1122H with EAX
(e) AND the data addressed by BP with CX and save the result in memory.
(f) AND the data stored in four words before the location addressed by SI
with DX and save the result in DX

## Q15. Select an OR instruction that will :

(a) OR BL with AH and save the result in AH
(b) OR 88H with ECX
(c) OR DX with SI and save the result in SI
(d) OR 1122H with BP
(e) OR the data addressed by BX with CX and save the result in memory
(f) OR the data stored 40 bytes after the location addressed by BP with AL
and save the result in AL
(g) OR AH with memory location WHEN and save the result in WHEN
Q16. Select the XOR instruction that will :
(a) XOR BH with AH and save the result in AH
(b) XOR 99H with CL
(c) XOR DX with DI and save the result in DX
(d) XOR 1A23H with ESP
Q17. Develop a sequence of instructions that sets(1) the rightmost four bits of
AX; clears (0) the leftmost three bits of AX; and inverts bits 7, 8 and 9 of
AX.