Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1- Write a RISC-V assembly program to read 3 unsigned integers and display the smallest integer (for read and display use ecall) Problem 2

image text in transcribed

Problem 1- Write a RISC-V assembly program to read 3 unsigned integers and display the smallest integer (for read and display use ecall) Problem 2 Write a RISC-V assembly program to read two numbers (x and y). If both x and y are positive, display 2, if only one of them is positive display 1, otherwise display 0 (for read and display use ecall). Problem 3 - Write a RISC-V assembly program that include a main calling program and a procedure called rec ln The main program reads input n and call the recursive procedure rec lin (define below) The argument n will be passed to rec_lin in register x10, and the procedure should also return the result in register x10. The main program should then display the result (for read and display use ecall). If n 5 rec lin(n)- 5 Else rec lin(n)-4xrec lin(n-5)+n Problem 1- Write a RISC-V assembly program to read 3 unsigned integers and display the smallest integer (for read and display use ecall) Problem 2 Write a RISC-V assembly program to read two numbers (x and y). If both x and y are positive, display 2, if only one of them is positive display 1, otherwise display 0 (for read and display use ecall). Problem 3 - Write a RISC-V assembly program that include a main calling program and a procedure called rec ln The main program reads input n and call the recursive procedure rec lin (define below) The argument n will be passed to rec_lin in register x10, and the procedure should also return the result in register x10. The main program should then display the result (for read and display use ecall). If n 5 rec lin(n)- 5 Else rec lin(n)-4xrec lin(n-5)+n

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Problem 1 This program reads three unsigned integers and displays the smallest integer assembly sect... 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

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions

Question

6. State one output involved with this client requirement. (1)

Answered: 1 week ago

Question

2. Discuss the types of messages that are communicated nonverbally.

Answered: 1 week ago

Question

How to solve maths problems with examples

Answered: 1 week ago

Question

Explain Coulomb's law with an example

Answered: 1 week ago

Question

What is operating system?

Answered: 1 week ago