Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SHOULD BE WRITTEN IN MIPS ASSEMBLY LANGUAGE NOT C! Part 1 (30 points) Process Static Array: Write a program with three subprograms for an integer

SHOULD BE WRITTEN IN MIPS ASSEMBLY LANGUAGE NOT C!

image text in transcribed

Part 1 (30 points) Process Static Array: Write a program with three subprograms for an integer array defined in the data segment. You have to pass array beginning address and the array size to a subprogram in $ao (la $a0, array), and $a1 (lw $al, arraySize) registers. PrintArray: Prints the contents of an array. CheckSymmetric: Checks if an array is symmetric (returns 1 in $vo if symmetric, returns 0 otherwise). FindMin Max: Finds minimum and maximum elements of an array and returns them, respectively, in $vo and $v1. Provide a simple user interface when appropriate. Assume that the variables array and arraySize are defined in the data segment like as follows. array: .word 10, 20, 30 arraySize: .word 3 3 For parameter passing use the argument registers where $ao: points to the beginning of the array, $al: number of elements in array. Your program should work for an array of size 0 or more. If the array size is O, it means that there will be no array definition in the data segment and the contents of $a1 will be equal to 0.) Part 1 (30 points) Process Static Array: Write a program with three subprograms for an integer array defined in the data segment. You have to pass array beginning address and the array size to a subprogram in $ao (la $a0, array), and $a1 (lw $al, arraySize) registers. PrintArray: Prints the contents of an array. CheckSymmetric: Checks if an array is symmetric (returns 1 in $vo if symmetric, returns 0 otherwise). FindMin Max: Finds minimum and maximum elements of an array and returns them, respectively, in $vo and $v1. Provide a simple user interface when appropriate. Assume that the variables array and arraySize are defined in the data segment like as follows. array: .word 10, 20, 30 arraySize: .word 3 3 For parameter passing use the argument registers where $ao: points to the beginning of the array, $al: number of elements in array. Your program should work for an array of size 0 or more. If the array size is O, it means that there will be no array definition in the data segment and the contents of $a1 will be equal to 0.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2017 Skopje Macedonia September 18 22 2017 Proceedings Part 3 Lnai 10536

Authors: Yasemin Altun ,Kamalika Das ,Taneli Mielikainen ,Donato Malerba ,Jerzy Stefanowski ,Jesse Read ,Marinka Zitnik ,Michelangelo Ceci ,Saso Dzeroski

1st Edition

3319712721, 978-3319712727

More Books

Students also viewed these Databases questions