Professional Documents
Culture Documents
Computer Architecture and Assembly Language Programming - CS401 Fall 2007 Assignment 01
Computer Architecture and Assembly Language Programming - CS401 Fall 2007 Assignment 01
PK
CS 401 Computer Architecture and Assembly Language
Assignment #01
Deadline
Your assignment must be uploaded / submitted before or on October 18, 2007.
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
Q#1.
Identify the problems in the following instructions and correct them by replacing
them with one or two instruction having the same effect.
Q#2.
Write a program to calculate the square of 10 by using a loop that adds 10 to the
accumulator 10 times.
Q#3.
If AX=8FFF and BX=0FFF 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.
i. jg greater
ii. jl smaller
iii. ja above
iv. jb below
Instructions Jump ZF SF CF
Jg greater
Jl smaller
Ja above
Jb below