Lab Assignment#2
Lab Assignment#2
Lab Assignment#2
1. What is a label and how does the assembler differentiates between code labels and data labels?
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
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.
b. mov [wordvar], 20
c. mov bx, al
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.