CS 232 – Assignment 8 Solved

$ 24.99
Category:

Description

General Rules:
1) For all questions, ARM assembly language is to be used.
Problem_1:
Write an assembly language program to sort an array of length ‘N’ in ascending order.
Assumptions and Instructions:
1) The array of ‘N’ bytes starts from memory address 0x40000001 in memory configured as read-write memory.
2) The length (N) of this byte array (array-to-be-sorted) is available at address 0x40000000.
3) Your program should read this array length from 0x40000000 and sort this array which is starting from 0x40000001.
4) The array is byte-oriented, that is each element of the array can hold a byte of data.
Problem_2:
Write a program to find the GCD of two numbers stored in R1 & R2 registers. The result is to be stored in the R3 register.
Problem_3:
There is a graph with multiple nodes. The distances between the different nodes of the graph are stored in an array. The array is an adjacency-matrix/adjacency-list. Select one of the nodes as a source node. Write a program to find the shortest distances from the source to all other nodes using Dijkstra’s algorithm. After execution, your program should store the result as an array of shortest distances from the source to all other nodes. The array is in ascending order of the destination node numbers
Assumptions and Instructions:
1) The number of nodes ‘N’ in the graph is to be read from address
0x30000000.
2) N >= 6, that is the graph should have at least 6 nodes 3) The edge/link cost/weight can be an integer value.
4) The adjacency-matrix/adjacency-list has to be read from the address 0x60000000.
5) Your task is to find the shortest paths from the source
(a-path-with-least-cost) to destinations in the sparsely connected graph using Dijkstra’s algorithm.
6) The node numbers N are set of Natural numbers 1,2,3, …. N
7) The node number (id) of the node which is selected as the source must be stored at address 0x40000000.
8) The results (the array of shortest distances) are to be stored from address 0x70000000 in the ascending order of node numbers of destinations.
Things required in Submission:
1. Entire keil project along with .asm file, assembled with 0 errors.
2. Screenshot of result in debug mode.
3. A report explaining how your program works (pdf format).
Submission rules:
2. Create a folder named lab8 (all small letters and no spaces).
3. Inside the above-mentioned folder create 3 more folders named Problem_1, Problem_2 and Problem_3.
4. Inside the folder, Problem_1 put all the relevant project files of including .asm source code file. Also, in the same folder put the related screenshots of result in debug mode and pdf report related Problem_1. Do the same thing for Problem_2 and Problem_3.
5. Finally, before you submit the lab8 folder on Moodle you will be zipping it. The zip file should have your id number as the name. For eg: if your id is 184070026 then your zip file will be 184070026.zip

Reviews

There are no reviews yet.

Be the first to review “CS 232 – Assignment 8 Solved”

Your email address will not be published. Required fields are marked *