Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do this in RISK-V not C The following assembly program have to be implemented in RISC-V simulator Write an assembly program that will make

Please do this in RISK-V not C

image text in transcribed

The following assembly program have to be implemented in RISC-V simulator Write an assembly program that will make use of the function count as follows: Hard-code the following 10 values into array a: 128, 10, 23, 12, 128, 9, 220, 46, 128, 5 Hard-code n = 10 Prompt the user to enter a value as follows: "Please enter an integer value Read the integer value and store it (let's call it ) Call the function count with the following arguments: count(a, 10.) Output the results as follows: "The number of times x appears in the list is res times Exit the program Implement the function count in assembly to use it in this part. The equivalent function count (in C) is defined as follows: int count(int all.int n, int xX int res = 0; int i = 0; for(i = 0; i != n; i++) if(a[i] == x) res = res + 1; return res; Maximum file size: 100MB, maximum number of fi

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_2

Step: 3

blur-text-image_3

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

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions

Question

i need correct answrrs 3 8 2 . .

Answered: 1 week ago

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago