Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q3 (60 Marks): Suppose that we need to write a RISC-style program that adds the two arrays ARR1-[2, 3, 5, 6] and ARR2-[3,6, 4, 2]

image text in transcribed
Q3 (60 Marks): Suppose that we need to write a RISC-style program that adds the two arrays ARR1-[2, 3, 5, 6] and ARR2-[3,6, 4, 2] in a reverse order and store the result in ARR3 (that is add the first element of ARRI with last element of ARR2 and put the result in the first element of ARR3, the second element of ARR1 added with second last element of ARR2 and put the result in the second element of ARR3, an so What instructions you will use at lines: 2, 6,9,12, 14, and 15. Solution: Movia R1,#N 2. Movia Movia Movie R2, #ARRI R3, ARR2 R4, #ARR3 3. 7. Loop: Load R. R2) Load R6, (R3) 8. 9. 10. R5, (R4) R2, R2, #4 Store Add 12. 13. 14. 15. Add R4, R4, #4 ORIGIN 0x500 16. 17. NDATAWORD4 18. ARRI: DATAWORD 2,3, 5, 6 19. ARR2: DATAWORD 3, 6,4,2 20. ARR3: RESERVE 16

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

More Books

Students also viewed these Databases questions

Question

What is meant by the Internet of Things?

Answered: 1 week ago

Question

What is order of reaction? Explain with example?

Answered: 1 week ago

Question

Derive expressions for the rates of forward and reverse reactions?

Answered: 1 week ago