CS401 Assignment No 1 Solution Spring 2017 | Virtual Study Solutions

Adsetra Ads

 

CS401 Assignment No 1 Spring 2017

Here we have CS401 - Computer Architecture and Assembly Language Programming Assignment No. 1 Solution and Discussion Spring 2017. CS401 Assignment Due Date: May 02, 2017. Assignment Total marks = 20.
CS401 Assignment No 1 Spring 2017 Solution and Discussion
CS401 Assignment No 1 Spring 2017 Solution and Discussion
Recommended : CS401 Mid Term Past Papers / Notes

You Can Also Download CS401 Mid Term Papers, CS401 Short Notes, CS401 Assignment Solutions, CS401 Lecture Wise Questions Answers Files,CS401 Solved MCQs, CS401 Solved Quiz , CS401 Mid Term Subjective Papers , CS401 Mid Term Objective Papers from Virtual Study Solutions For Preparation of Mid Term Papers.

CS401 Assignment Instructions

Please carefully read the following instructions before attempting assignment.

CS401 Assignment Rules of 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.
Recommended : DevC++ Installation and Usage Complete Guidelines

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.

Topics Covered in CS401 Assignment no 1 :

  • Registers
  • Intel Architecture
  • Register Architecture
  • Data Declaration
  • Addressing Modes

CS401 Assignment Important Note: 

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

Recommended: What is Network Topology and its Types - Complete Tutorial

CS401 Assignment Questions No 01 

marks = 10

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.

Odd=1,3,5,7,9,11,13,15,17,19,21
Add Both arrays (index wise) into a third array named as “Sum”.

SUM [0] = Even [0] + Odd [0]

SUM [1] = Even [1] + Odd [1]

Up to

SUM [n] = Even [n] + Odd [n]

Please Note: You cannot use LOOP or any other repetitive structure to solve this questions.

CS401 Assignment Questions No 02 

marks = 10

Suppose, we have the following register values:


AX
FA10
DS
32FA
SI
222A
BX
050C
CS
6FDE
SP
6D6E
CX
1202
ES
E9A2
BP
FF21
DX
FFEF
SS
CD33
DI
2829

You are required to calculate the physical address generated by each of the following instructions.
  1. MOV [bP+Fa21], AX
  2. ADD CX, [SP+FaFa]
Please Note: Each provided instruction is independent & all numbers are stated in Hexadecimal number system.

Recommended : All Mid term Paper Solved By Moaaz

CS401 Assignment Helping Material

Arrays in Assembly Language

There are two ways to define an array in assembly language.

12.4.1. Initialized Lists

An initialized array is defined in the same way as a scalar variable, but with multiple initial values. scores: .word 100, 78, 63, 88, 52, 91, 75

MAL also provides a mechanism for defining a large array with all elements initialized to the same value: scores: .word 0:100

12.4.2. Uninitialized Memory Blocks

Uninitialized arrays are defined using the .space directive.

Caution The .space directive allocates the specified number of bytes. Specifying the desired number of array elements is a common mistake. scores: .space 400

12.4.3. Working with Arrays
To access an array in assembly language, we use a pointer. A pointer is simply a register or variable that contains a memory address.

The value in the pointer is computed as shown in the previous sections by adding the base address of the array and the offset of the desired element.



CS401 Assignment No 1 Solution discussion idea
CS401 Assignment No 1 Solution and discussion idea

CS401 Assignment No 1 Solution Spring 2017

You can download CS401 Assignment no 1 Solution file from the Link below:


CS401 Assignment Question No 1 Solution

CS401 Assignment Question No 1 Solution and Discussion
CS401 Assignment Question No 2 Solution and Discussion

CS401 Assignment No 2 Solution

CS401 Assignment Question No 2 Solution and Discussion
CS401 Assignment Question No 2 Solution and Discussion

If You liked this Post Please share with friends Thank You

Post a Comment

 

Top