Labels and Effective Addresses-Microprocessor and Assembly Language Programming-Assignment, Exercises of Microprocessor and Assembly Language Programming

This task was assigned at Quaid-i-Azam University for Microprocessor and Assembly Language Programming course by Prof. Saleem Raza. Its main points are: Label, Architecture, Assembler, Combination, memory, Wraparound, Loop, Accumulator

Typology: Exercises

2011/2012

Uploaded on 08/04/2012

saqqi
saqqi 🇵🇰

4

(33)

40 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
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.
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.

Partial preview of the text

Download Labels and Effective Addresses-Microprocessor and Assembly Language Programming-Assignment and more Exercises Microprocessor and Assembly Language Programming in PDF only on Docsity!

  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=0x 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+ d. bx- 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. 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.