CS401 Computer Architecture and Assembly Language Programming Assignment No. 1 Solution and Discussion Spring 2017 Due Date: May 02, 2017
Computer Architecture and Assembly Language Programming (CS401)
Assignment # 01
Total marks = 20
2nd of May,
Please carefully read the following instructions before attempting assignment.
RULES FOR MARKING
It should be clear that your assignment would not get any credit if:
You should consult the recommended books to clarify your concepts as handouts are not sufficient.
You are supposed to submit your assignment in .doc or docx format.
Any other formats like scan images, PDF, zip, rar, ppt and bmp etc will not be accepted.
No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.
If you people find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline no queries will be entertained in this regard.
For any query, feel free to email at:
Questions No 01 10 marks
Write an assembly language code that will:
- Initialize an array named as “Even”, which contain first ten EVEN numbers.
Even = 0,2,4,6,8,10,12,14,16,18
- Initialize an array named as “Odd”, which contain first ten ODD numbers.
- Add Both arrays (index wise) into a third array named as “Sum”.
SUM  = Even  + Odd 
SUM  = Even  + Odd 
SUM [n] = Even [n] + Odd [n]
Note: You cannot use LOOP or any other repetitive structure to solve this questions.
Questions No 02 10 marks
Suppose, we have the following register values:
You are required to calculate the physical address generated by each of the following instructions.
- MOV [bP+Fa21], AX
- ADD CX, [SP+FaFa]
Note: Each provided instruction is independent & all numbers are stated in Hexadecimal number system.DOWNLOAD SOLUTION HERE