We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Computer Architecture and Assembly Language Programming (CS401)

Assignment # 01

 

Total marks = 20                                                                              

 

Deadline Date

2ndof May,

2017

 

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 consultthe recommended books to clarify your concepts as handouts are not sufficient.

 

You are supposed to submit your assignment in .doc or docxformat.

Any other formats like scan images, PDF, zip, rar, ppt and bmp etc will not be accepted.

 

Topic Covered:

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

 

 

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

 

 

 

QuestionsNo 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.

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]

 

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:

 

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. ADDCX, [SP+FaFa]

 

Note: Each provided instruction is independent & all numbers are stated in Hexadecimal number system.

plz send solution

 

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 6996

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions. Read More>>

 

Note:-

For Important Helping Material related to this subject (Solved MCQs, Short Notes, Solved past Papers, E-Books, FAQ,Short Questions Answers & more). You must view all the featured Discussion in this subject group.

For how you can view all the Featured discussions click on the Back to Subject Name Discussions link below the title of this Discussion & then under featured Discussion corner click on the view all link.

Or visit this link 

Click Here For Detail.

&

.•°How to Download past papers from study groups°•.

 

Please Click on the below link to see…

.... How to Find Your Subject Study Group & Join .... 

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                                                                              

 

Deadline Date

2nd of May,

2017

 

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.

 

Topic Covered:

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

 

 

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

 

 

 

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.

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]

 

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:

 

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]

 

Note: Each provided instruction is independent & all numbers are stated in Hexadecimal number system.

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.

Thanks sir

Ye unrelated comments ha 

Dear Students Don’t wait for solution post your problems here and discuss ... after discussion a perfect solution will come in a result. So, Start it now, replies here give your comments according to your knowledge and understandings....

Any idea of question #2?
I am not getting the answer according to the instructions given

CS401 Assignment 1 Sp17 Solution idea

Attachments:

CS401 Assignment 1 Idea Solution
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.

Seems all correct but can you tell the procedure how to calculate the physical address as in the your file you just wrote the calculated answer. It will be very helpful if you tell that how did u calculated that!

I can assure about 1st question that it is correct. While taking sometime will get u know bout 100% surety

RSS

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.