EXERCISES

Posted by Atezaz | 6:43 PM | | 0 comments »

1. What is a label and how does the assembler differentiates between code labels and data labels?
2. List the seven addressing modes available in the 8088 architecture.

3. Differentiate between effective address and physical address.

4. What is the effective address generated by the following instructions? Every instruction is independent of others. Initially BX=0x0100, num1=0x1001, [num1]=0x0000, and SI=0x0100
a. mov ax, [bx+12]

b. mov ax, [bx+num1]

c. mov ax, [num1+bx]

d. mov ax, [bx+si]

5. What is the effective address generated by the following combinations if they are valid. If not give reason. Initially BX=0x0100, SI=0x0010, DI=0x0001, BP=0x0200, and SP=0xFFFF
a. bx-si
b. bx-bp

c. bx+10

d. bx-10
e. bx+sp

f. bx+di

6. Identify the problems in the following instructions and correct them by replacing them with one or two instruction having the same effect.

33


a. mov [02], [ 22]

b. mov [wordvar], 20

c. mov bx, al

d. mov ax, [si+di+100]

7. What is the function of segment override prefix and what changes it brings to the opcode?
8. What are the two types of address wraparound? What physical address is accessed with [BX+SI] if FFFF is loaded in BX, SI, and DS.

9. Write instructions to do the following.
a. Copy contents of memory location with offset 0025 in the current data segment into AX.
b. Copy AX into memory location with offset 0FFF in the current data segment.

c. Move contents of memory location with offset 0010 to memory location with offset 002F in the current data segment.
10. Write a program to calculate the square of 20 by using a loop that adds 20 to the accumulator 20 times.

0 comments