Assignment No. 1 Graded Semester Fall 2018 Computer Architecture and Assembly Language Programming– CS401 Solution

Discuss CS Assignments in this section .
Forum rules
Discuss Following Subjects Assignments:
CS101,CS201,CS206,CS301,CS302,CS304,CS311,CS312,CS401,CS402,CS403,CS408,CS410,CS411,CS501,CS502,CS504,CS506,CS507,CS508,CS601,CS602,CS604,CS605
CS606,CS607,CS609,CS610,CS614,CS615,CS701,CS702,CS703,CS704,CS706,CS707,CS708,CS709,CS710,CS711,CS712,CS713,CS716,CS718,CS721,CS723,CS724,CS726
Post Reply
User avatar
ALI RAZA
★★★★★★★★★★★★★
★★★★★★★★★★★★★
Posts: 177
Joined: Fri Dec 22, 2017 8:10 am
Location: Lahore
Has thanked: 6 times
Been thanked: 7 times
Contact:
Status: Offline

Assignment No. 1 Graded Semester Fall 2018 Computer Architecture and Assembly Language Programming– CS401 Solution

Post by ALI RAZA » Sun Dec 02, 2018 10:03 am

Question: 1 [20 Marks]
You will write assembly program that will sort digits in your VUID (VU Roll Number).
You will take all the digits of your VU and make odd digits of ID signed and keep even digits of Id unsigned.
For example let’s say your VUID is BC123456789
Here 1, 3, 5, 7, 9 will become -1,-3,-5,-7,-9 and 2,4,6,8 will remain same. (0 will remain same)
Now array of digits will be used in program as
-1, 2,-3, 4,-5, 6,-7, 8,-9
Take above converted digits of your VUID and sort your VUID using Insertion sort, in descending order:
That is, at the end of your program, the numbers must be in the following order in array:
8, 6, 4, 2,-1,-3,-5,-7,-9
You will explain each instruction of program in comments and also provide/paste snapshot of your assembled
and debugged program and result which will be run in AFD (A Full Screen Debugger) window showing the
executed code and final result i.e. value in (M2 window of AFD )
You will submit code, contents of listing file and three screen shots in a Microsoft Word file. Solution
submitted in any other format like zip, jpg etc. will not get any marks.
First screenshot will contain the command to assemble the code and
Second screenshot will contain the initial unsorted values loaded in M2 window of AFD
Third screenshot will contain the final sorted values in (M2 window of AFD)
Note 1: You will use conditional jumps and functions/sub-routines to solve the above problem. Marks will
not be awarded for using any other approach.
Note 2: keep name of assembly file according to your VU id , i.e. if your VU id is BC123456789 , you will
keep name of the assembly code file as 23456789.asm i.e. you will use last 8 digits of your id for the
code file name.
Note 3: If the digit’s arrays or files names in the screen shots will not be according to your VU id you will get
zero marks.
Note 4: No need to include alphabet part of your id in array. I.e. if your id is BC123456789 you will use
123456789 to make the arrays, you will ignore the BC part.
Note 5: Helping material
 Insertion Sort http://cs.armstrong.edu/liang/animation ... nSort.html
https://visualgo.net/bn/sorting?slide=8
https://en.wikipedia.org/wiki/Insertion_sort
 AFD Tutorial https://vulms.vu.edu.pk/Courses/CS401/D ... torial.pdf
 Use F2 instead of F1 for execution of code in AFD. You will have to press it fever times as compared
to F1
 How to take screen shots https://www.take-a-screenshot.org/windows.html
Example Run
You will add code and contents of listing file in your solution. Then you will provide screen shots as shown
below
Image



User avatar
Rauf ahmad
***New Member***
***New Member***
Posts: 1
Joined: Wed Dec 05, 2018 4:05 pm
Status: Offline

Re: Assignment No. 1 Graded Semester Fall 2018 Computer Architecture and Assembly Language Programming– CS401 Solution

Post by Rauf ahmad » Wed Dec 05, 2018 4:15 pm

Any one have the code for this program if yes then please post on this link because it is not understand able...
Thanks.

User avatar
ALI RAZA
★★★★★★★★★★★★★
★★★★★★★★★★★★★
Posts: 177
Joined: Fri Dec 22, 2017 8:10 am
Location: Lahore
Has thanked: 6 times
Been thanked: 7 times
Contact:
Status: Offline

Re: Assignment No. 1 Graded Semester Fall 2018 Computer Architecture and Assembly Language Programming– CS401 Solution

Post by ALI RAZA » Wed Dec 05, 2018 6:55 pm

Rauf ahmad wrote:
Wed Dec 05, 2018 4:15 pm
Any one have the code for this program if yes then please post on this link because it is not understand able...
Thanks.
Main try krta hun dua krna par kuch khud se krney ki koshush na krna khain jawab na aa jaye ap ko :D :lol: :mrgreen:

User avatar
ALI RAZA
★★★★★★★★★★★★★
★★★★★★★★★★★★★
Posts: 177
Joined: Fri Dec 22, 2017 8:10 am
Location: Lahore
Has thanked: 6 times
Been thanked: 7 times
Contact:
Status: Offline

Re: Assignment No. 1 Graded Semester Fall 2018 Computer Architecture and Assembly Language Programming– CS401 Solution

Post by ALI RAZA » Thu Dec 06, 2018 8:28 am

Close to Solution Program Check This Code Click For Similar Solution

Post Reply

Last 10 Members Who Visited This Topic

User avatar muhammad waseem5023 (7), User avatar ALI RAZA (34), User avatar Shanza Noreen (1), User avatar azharanraza (1), User avatar Rauf ahmad (5)

  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest