Computer Architecture and Assembly Language Programming (CS401)Assignment # 01
Total Marks: 10
Due Date: 14-11-2016
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:
- The assignment is submitted after the due date.
- The submitted assignment does not open or file is corrupt.
- Strict action will be taken if submitted solution is copied from any other student or from the internet.
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.
· Intel Architecture
· Register Architecture
· Data Declaration
· Addressing Modes
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: CS401@vu.edu.pk
Questions No 01 10 marks
Write a complete assembly language code for the following pseudo code:
Initialize a variable named “NUM1” with “04 as a Hexadecimal Number”
Initialize a variable named “NUM2” with “08 as a Hexadecimal Number”
Initialize a variable named “NUM3” with “12 as a Hexadecimal Number”
Initialize a variable named “NUM4” with “00 as a Hexadecimal Number”
Initialize AX with zero “0”
Initialize BX with zero “0”
Move NUM1 into AX
Move NUM2 into BX
Add BX into AX
Move NUM3 into BX
Add BX into AX
Store AX into NUM4
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.
1. ADD [bx+Di], CX
2. MOV DX, [SP+1652H]
Note: Each provided instruction is independent.