Professional Documents
Culture Documents
Computer Architecture and Assembly Language Programming - CS401 Fall 2006 Assignment 01 Solution
Computer Architecture and Assembly Language Programming - CS401 Fall 2006 Assignment 01 Solution
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
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