You are on page 1of 2

CS 401 Computer Architecture and Assembly Language

Programming
Assignment #01

Deadline
Your assignment must be uploaded / submitted before or on October 18, 2006.
Upload Instructions
Please view the assignment submission process document provided to you by the Virtual
University to upload the assignment.
Rules for Marking
Please note that your assignment will not be graded if:
 It is submitted after due date
 The file you uploaded does not open
 The file you uploaded is copied from some one else
 It is in some format other than .doc
Objective

The assignment has been designed to enable you:

 To know about different addressing modes


 To calculate effective address and physical address
 To know about the comparisons and conditions

Question # 1. What is wrong with following instructions?


a) mov [byte1], 20
b) mov [111],[333]
c) mov [BX],[SI]
d) mov CS, SS
e) mov DL, CX
Solution:
a. Size of movement is not specified.
b. Memory to memory data movement is not allowed
c. Memory to memory data movement is not allowed.
d. Segment to Segment movement is not allowed.
e. Size mismatch.
Question # 2 What is the effective address generated by the following combinations if
they are valid. Initially BX= 0x0200, SI= 0x0020, DI= 0x0002, BP= 0X400 AND SP=
0XFFFF?
a) bx + bp
b) bx + sp
c) bx + di
d) bx-si
e) bx + 100

Solution:
a) Invalid
b) Invalid
c) 0x0202
d) Invalid
e) 0x300

Question # 3
If AX=0x8000 and BX=0x0001 and “cmp ax, bx” is executed, which of the following
jumps will be taken? Each part is independent of others. Also give the value of Z, S, and
C flags.
a. jg greater
b. jl smaller
c. ja above
d. jb below
Solution:
Instructions Jump ZF SF CF
Jg greater Not taken 0 0 0
Jl smaller Taken 0 0 0
Ja above Taken 0 0 0
Jb below Not taken 0 0 0

You might also like