Vous êtes sur la page 1sur 1

Microprocessor Systems

Assignment#2

1. Describe the operations performed by the following instructions


a. MUL

e. AND

i. IN

b. IMUL

f. OR

j. OUT

c. DIV

g. ROL

k. CMP

d. IDIV

h. ROR

l. ADC

What can be the destination and source operands for each of these instructions? e.g. for ADD
instruction the destination can be memory/register and source can be memory/register/immediate
value.
Note: You can consult chapter No. 6 to study the detail for each instruction.
2. Write down the instructions for swapping the bytes in BX register.
3. Construct the binary code for each of the following 8086 instructions.
a. MOV BL, AL
b. MOV BX, CS
c. MOV DH, 240H[SI]
d. AND AL, 0FH
e. ROR AX, 1
f. IN AL, DX
g. ADD 59H[DI], BX
You can consult Appendix B for constructing the machine codes for part (d) through (g). The D and
W bits are included in the opcode field in appendix B. The mod, REG and R/M bits are same as for
MOV instruction.
4. If DS = 5214H, SI = 2010H and DI = 2345H, then calculate the effective address and physical address
of the memory locations addressed in part (c) and (g) of question 3.
5. If AX = -100 and BX = 50, then describe the values of the CF, SF, ZF and OF flag bits after the
execution of the CMP AX, BX instruction.
6. Solve Question No.5 of REVIEW Questions and problems at the end of chapter No 4.
7. Explain the test expression (SF XOR OF) = 1 for JL/JNGE and (CF OR ZF) = 1 for JBE/JNA .

Vous aimerez peut-être aussi